itzhaokun
itzhaokun
我也是提示这个,你解决了吗
第一次进去默认就是第一张图片往左滑动就到头了
4张图,现在可以往左滑动了,有时候在运行中和第一次加载会报错 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v7.widget.RecyclerView$LayoutManager.canScrollVertically()' on a null object reference at com.xuezj.cardbanner.view.CardView.findViewAtCenter(CardView.java:163) at com.xuezj.cardbanner.view.CardView.onLayout(CardView.java:67) 你能看下这个错误吗
java.lang.AbstractMethodError: abstract method "void com.bumptech.glide.module.RegistersComponents.registerComponents(android.content.Context, com.bumptech.glide.Glide, com.bumptech.glide.Registry)" at com.bumptech.glide.Glide.initializeGlide(Glide.java:230) at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:171) at com.bumptech.glide.Glide.get(Glide.java:155) at com.bumptech.glide.Glide.getRetriever(Glide.java:528) at com.bumptech.glide.Glide.with(Glide.java:554) at com.xuezj.cardbanner.adapter.CardAdapter.onBindViewHolder(CardAdapter.java:82) at com.xuezj.cardbanner.adapter.CardAdapter.onBindViewHolder(CardAdapter.java:18) at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6482) at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6515) at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5458) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5724) at...
@GlideModule public class MyAppGlideModule extends AppGlideModule { @Override public boolean isManifestParsingEnabled() { return false; } } 创建这个类。重写这个方法就好了,改一下吧
是的,有什么冲突吗?
嗯,这个问题我在项目中解决了
修改了之后还是会出现问题 java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.view.View.getTag(int)' on a null object reference at com.xuezj.cardbanner.view.CardView.getCurrentItem(CardView.java:160) at com.xuezj.cardbanner.CardBanner$2.run(CardBanner.java:195) at com.xuezj.cardbanner.i$c.run(WeakHandler.java:205) at android.os.Handler.handleCallback(Handler.java:809) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:166) at android.app.ActivityThread.main(ActivityThread.java:7555) at java.lang.reflect.Method.invoke(Native...