I just upgraded Android studio to the latest version :
Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338, built on October 9, 2018 JRE: 1.8.0_152-release-1136-b06 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
and this meant also an update for the build tools to 28.0.3 . Since then I am not able to compile my project that was OK.
I am stuck with an error
error: cannot find symbol variable radio_animator
This error points to my java file where I try to get AnimationDrawable from resource xml file:
ContextCompat.getDrawable(this, R.drawable.radio_animator)
Before the upgrade all worked fine...
Now the same resource seems not to be visible as a resource. I did not change a single letter in code..., I did not move or replace the xml resource file.
When I click the R.drawable.radio_animator in the editor it opens the animation list xml so it is visible for the editor...
I checked Google documentation on AnimationDrawable and I adhere to the example provided, no change.
Not sure what I am doing wrong . Is there any (not yet) documented change coming with the latest Android studio upgrade and the latest build tools?
I am targeting the app yet to Android 7.0, API 24 and perhaps there is some incompatibility.
I also tried to setBackgroundResource to a view and get it from there as shown here: Google documentation
The same result with error.
The only solution I found so far was removing the part of the code referring to the AnimationDrawable resource getter and I can compile the app with the loss of animation functionality as a result :-)
Any hint ?
Thanks
My animation list xml file is defined like:
and it resides in res/drawable as per documentation