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

怎么解决java.lang.RuntimeException: Unable to start activity ComponentInfo{} #46

Open
applehong5013 opened this issue Oct 24, 2018 · 3 comments

Comments

@applehong5013
Copy link

applehong5013 commented Oct 24, 2018

我的project原本就有使用glide了, 但是implemented 你的library 后就有这个package 不一样导致的问题。请问怎么解决?
java.lang.RuntimeException: Unable to start activity ComponentInfo{}: java.lang.ClassCastException: com.chinalwb.are.glidesupport.GlideRequests cannot be cast to com.xxxx.xxx.xxx.GlideRequests

@chinalwb
Copy link
Owner

不好意思最近事情有点多 可能要晚点才能看了

@applehong5013
Copy link
Author

好的 我等你哦 ^^

@chinalwb
Copy link
Owner

chinalwb commented Nov 7, 2018

非常抱歉。我刚有时间看这个问题。

我在我的示例程序中
加上了

dependencies {
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:design:27.1.0'
    compile 'com.android.support:appcompat-v7:27.1.0'

    implementation 'com.github.bumptech.glide:glide:4.3.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.3.1'
    implementation 'com.github.chinalwb:are:0.1.2'
}

然后在IndexActivity.java
加上了

ImageView imageView = (ImageView) findViewById(R.id.image);

        GlideApp.with(this).load("http://a.hiphotos.baidu.com/image/h%3D300/sign=b18b23079522720e64cee4fa4bca0a3a/4a36acaf2edda3ccc4a53e450ce93901213f9216.jpg").into(imageView);

结果是可以的。

没有发现错误。

麻烦您可以多提供一些信息吗?
谢谢。

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

2 participants