问题
When I tried using a newer version of Glide Library gives me Binding Error in all the file. The moment I revert back to the older version, it works.
The version I was using:
**api 'com.github.bumptech.glide:glide:4.3.0'**
Newer Version I updated:
**dependencies {
compile 'com.github.bumptech.glide:glide:4.7.1'
}**
Not sure about the cause of the issue.
error: package com.xxx.xxx.databinding does not exist
it is the same for all class
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
Actual issue I'm facing is this: https://stackoverflow.com/questions/49976044/crash-on-using-glide-library/49976172?noredirect=1#comment86975685_49976172
回答1:
Finally, I am able to fix this issue by placing the Glide dependency in both the Gradle files. Previously, I was trying to add the dependency on one of those files. Surprisingly the older version of the Glide was working not the newer one. Now I placed the new version of the Glide in the both Gradle files. BOOOOOM! It works.
My project structure(MVVM):
-core
- app
implementation 'com.github.bumptech.glide:glide:4.8.0'
来源:https://stackoverflow.com/questions/49980440/using-newer-version-of-glide-library4-7-1-causing-binding-error-issue