Skip to main content

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


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>

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>

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
  • Was this article helpful?