我有一个Android库,它使用幻灯片来加载图像。幻灯片生成的类很少,如GlideRequests,、GlideApp等。在我的库中,幻灯片中使用:
GlideApp.with(view)...在中,生成的GlideApp类的方法是这样的代码:
public static GlideRequests with(View view) {
return (GlideRequests) Glide.with(view);
}其中GlideRequests也由Glide类生成。
我为我的aar库创建了Xamarin绑定,还包括了来自NuGet的Glide。但是,当在库中调用GlideApp.with(view)...方法时,Xamarin给了我一个例外:
Java.Lang.ClassCastException: com.bumptech.glide.RequestManager cannot be cast to
com.photobutler.android.pbsdk.presentation.glide.GlideRequests
at java.lang.ClassCastException: com.bumptech.glide.RequestManager cannot be
cast to com.photobutler.android.pbsdk.presentation.glide.GlideRequests
at at com.photobutler.android.pbsdk.presentation.glide.GlideApp.with(...)GlideRequests是RequestManager的子类
public class GlideRequests extends RequestManager {...}所以一切都应该很好,但我有例外。有人能帮我找个解决办法吗?
发布于 2017-12-26 11:07:59
https://stackoverflow.com/questions/47968679
复制相似问题