Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

多个Glide冲突报错(已解决!内附解决方案) #9

Open
zhongzilu opened this issue May 24, 2018 · 6 comments
Open

多个Glide冲突报错(已解决!内附解决方案) #9

zhongzilu opened this issue May 24, 2018 · 6 comments

Comments

@zhongzilu
Copy link

哥,我的项目中引用了该项目,后来报了一个错误:

java.lang.NoSuchMethodError: No virtual method into(Landroid/widget/ImageView;)Lcom/bumptech/glide/request/target/Target; in class Lcom/bumptech/glide/RequestBuilder; or its super classes (declaration of 'com.bumptech.glide.RequestBuilder' appears in /data/app/com.hyphenate.chatuidemo-2/split_lib_dependencies_apk.apk:classes28.dex)

项目还引用了easeui,easeui也使用了glide,它的版本为3.7.0,你的项目中引用了4.0.0,不知道是不是冲突了,可是我已经将easeui中所使用到的glide全部替换成了picasso后,还是报这个错误,请问我该怎么解决呢?急

@DmcSDK
Copy link
Owner

DmcSDK commented May 24, 2018

可以一起用glide的
看看这个:https://www.jianshu.com/p/dd5d4fda1df8

或者

//强制使用相同版本的库
configurations.all {

    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') { //替换成glide
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '25.3.1'//替换成glide
            }
        }
    }
}

@DmcSDK DmcSDK changed the title Glide报错 多个Glide冲突报错 May 25, 2018
@DmcSDK
Copy link
Owner

DmcSDK commented May 25, 2018

请问解决了吗?

@zhongzilu
Copy link
Author

oops! NO, 具体什么原因导致的还得再分析分析。另外,强制使用相同版本的库的代码是放到哪个节点中?

@zhongzilu
Copy link
Author

问题已解决,具体操作请查看该博客:
https://blog.csdn.net/ohanweb123/article/details/55253894

@DmcSDK DmcSDK changed the title 多个Glide冲突报错 多个Glide冲突报错(已解决!内附解决方案) May 31, 2018
@chat491231702
Copy link

@zhongzilu 我按你说的把重复的依赖排除掉还是无法解决问题,以下报错
java.lang.NoSuchMethodError: No virtual method into(Landroid/widget/ImageView;)Lcom/bumptech/glide/request/target/Target; in class Lcom/bumptech/glide/RequestBuilder; or its super classes (declaration of 'com.bumptech.glide.RequestBuilder'

依赖设置
implementation('com.dmcBig:mediapicker:+') {
exclude group: 'com.github.bumptech.glide'
}

@makecloud
Copy link

可能不是多版本glide的问题。。。我搞了半天没搞定.
然后我下载到本地依赖,把你依赖的4.0.0改成跟我一样的4.8.0,完美解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants