I'm facing Java compilation error because it is unable to find AnimatedImage & AnimatedImageDecoder interfaces/classes. The issue occurs in WebPImage class. When I open the WebPImage class, it shows that the whole "base" package is missing. Weird part is it was working till yesterday and I've done no changes to the code or my system.
---This is the issue

---This is WebPImage class

I also tried to invalidate caches & restart option from Android Studio but it didn't work. I even created a new project and moved the code one-file-at-a-time to fix the issue, didn't work either.
Use the Fresco libraries (tried 1.9.0 to 1.11.0) in the Android project.
Try to initialize WebPImage.
Build the project.
In the project gradle file, changed the gradle version to:
classpath 'com.android.tools.build:gradle:3.2.1'
And changed the gradle wrapper to:
gradle-4.10.1
After trial and error, I stumbled onto this configuration and it worked. I'm not sure why it didn't because it was working until yesterday evening with the gradle alpha versions.
Thanks for investigating @ojhariddhish. Looks like a bug in the Gradle version. Let us know if you experience this issue again.
Experiencing this on:
Full stacktrace:
> Task :app:compileDebugJavaWithJavac FAILED
C:\Users\carst\Documents\git\privat\thinking-stickers\app\src\main\java\de\chagemann\thinkingstickers\StickerPackValidator.java:134: error: cannot access AnimatedImage
final WebPImage webPImage = WebPImage.create(bytes);
^
class file for com.facebook.imagepipeline.animated.base.AnimatedImage not found
C:\Users\carst\Documents\git\privat\thinking-stickers\app\src\main\java\de\chagemann\thinkingstickers\StickerPackValidator.java:135: error: cannot access AnimatedImageDecoder
if (webPImage.getHeight() != IMAGE_HEIGHT) {
^
class file for com.facebook.imagepipeline.animated.factory.AnimatedImageDecoder not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
Could you perhaps report this upstream at gradle/the gradle plugin, please?
Works with gradle 4.10.1and gradle plugin 3.3.1.
I have the same problem . I don't know the exact cause of this problem.
add one more dependency
implementation 'com.facebook.fresco:animated-base:1.13.0'
I have the same problem . I don't know the exact cause of this problem.
add one more dependency
implementation 'com.facebook.fresco:animated-base:1.13.0'
Solution
In the project gradle file, changed the gradle version to:
classpath 'com.android.tools.build:gradle:3.2.1'And changed the gradle wrapper to:
gradle-4.10.1After trial and error, I stumbled onto this configuration and it worked. I'm not sure why it didn't because it was working until yesterday evening with the gradle alpha versions.
add one more dependency
implementation 'com.facebook.fresco:animated-base:1.13.0'