Skip to main content
Kofax

Style Attribute Not Found errors building MobileDemo app in Android Studio 3.x

22845

Question / Problem:

I am running Android Studio v3.x.

When I attempt to build the MobileDemo sample app, I receive several error messages like the following:

Error:(70, 5) error: style attribute '@android:attr/windowEnterAnimation' not found.
Error:(70, 5) error: style attribute '@android:attr/windowExitAnimation' not found.
Error:(80, 5) error: style attribute '@android:attr/windowEnterAnimation' not found.

What is causing this issue?

Answer / Solution:

This is something that changed in a recent Android Studio update.

Navigate to this file:

C:\Projects\KofaxMobileSDK-3.2.1\Android\SampleApps\Native\KofaxMobileDemo- Android\res\values\styles.xml

And remove the @ symbol from the attributes so that they look like:

<style name="Animations.PopDownMenu.Right">
   <item name="android:windowEnterAnimation">@anim/grow_from_topright_to_bottomleft</item>
   <item name="android:windowExitAnimation">@anim/shrink_from_bottomleft_to_topright</item>
</style>

instead of:

<style name="Animations.PopDownMenu.Right">
    <item name="@android:windowEnterAnimation">@anim/grow_from_topright_to_bottomleft</item>
    <item name="@android:windowExitAnimation">@anim/shrink_from_bottomleft_to_topright</item>
</style>

This needs to be done for every attribute that has an @ symbol in front of it. There should be about 16. This issue will be addressed in the SDK 3.3 release.

Applies to:

Product Version
MOBILESDK 2.6
  3.0
  3.1
  • Was this article helpful?