使用较新版本的Glide Library(4.7.1)会导致绑定错误问题 [英] Using Newer version of Glide Library(4.7.1) causing Binding error issue
问题描述
当我尝试使用更新版本的Glide Library时,在所有文件中均出现绑定错误.当我恢复到较旧的版本时,它就起作用了.
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.
我使用的版本:
**api 'com.github.bumptech.glide:glide:4.3.0'**
我更新的较新版本:
**dependencies {
compile 'com.github.bumptech.glide:glide:4.7.1'
}**
不确定问题的原因.
错误:包com.xxx.xxx.databinding不存在
-
所有班级都一样
it is the same for all class
org.gradle.api.tasks.TaskExecutionException:任务':app:compileDebugJavaWithJavac'的执行失败. 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100) 在org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) 在org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)处 在org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
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)
我面临的实际问题是:https://stackoverflow.com/questions/49976044/crash-on-using-glide-library/49976172?noredirect=1#comment86975685_49976172
Actual issue I'm facing is this: https://stackoverflow.com/questions/49976044/crash-on-using-glide-library/49976172?noredirect=1#comment86975685_49976172
推荐答案
最后,我可以通过将Glide依赖项放在两个Gradle文件中来解决此问题. 以前,我试图在这些文件之一上添加依赖项.令人惊讶的是,较旧版本的Glide不能工作于较新的版本. 现在,我在两个Gradle文件中都放置了新版本的Glide. OO!可以.
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
My project structure(MVVM):
-core
- app
implementation 'com.github.bumptech.glide:glide:4.8.0'
这篇关于使用较新版本的Glide Library(4.7.1)会导致绑定错误问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!