ViewPagerIndicator库在4.4中不起作用

时间:2015-12-30 15:08:19

标签: android android-viewpager viewpagerindicator

我正在使用viewpagerindicator库来显示圈子指示符,它在5.0(Lolipop), 6.0(Marshmallow)上运行良好,但它在4.4(Kitkat)上崩溃。我尝试通过添加库项目并使用基于模块的依赖项以下选项,但没有一个适用于4.4

compile 'fr.avianey.com.viewpagerindicator:library:2.4.1'

这是日志。

2-29 18:27:22.992  32182-32182/com.kicksexchange D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0177
12-29 18:27:22.992  32182-32182/com.kicksexchange I/dalvikvm﹕ Could not find method com.viewpagerindicator.CirclePageIndicator.setViewPager, referenced from method com.kicksexchange.fragments.ProductDetail.updateUI
12-29 18:27:23.002  32182-32182/com.kicksexchange W/dalvikvm﹕ VFY: unable to resolve virtual method 62723: Lcom/viewpagerindicator/CirclePageIndicator;.setViewPager (Landroid/support/v4/view/ViewPager;)V
12-29 18:27:23.002  32182-32182/com.kicksexchange D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0271
12-29 18:27:23.072  32182-32182/com.kicksexchange D/ProductDetail﹕ onCreate Product Detail Fragment
12-29 18:27:23.072  32182-32182/com.kicksexchange D/ProductDetail﹕ 205
12-29 18:27:23.072  32182-32182/com.kicksexchange D/ProductDetail﹕ Nike Sports Shoes
12-29 18:27:23.192  32182-32182/com.kicksexchange D/AndroidRuntime﹕ Shutting down VM
12-29 18:27:23.192  32182-32182/com.kicksexchange W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x42046d58)
12-29 18:27:23.242  32182-32182/com.kicksexchange E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.kicksexchange, PID: 32182
    android.view.InflateException: Binary XML file line #122: Error inflating class com.viewpagerindicator.CirclePageIndicator
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at com.kicksexchange.fragments.ProductDetail.onCreateView(ProductDetail.java:152)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5050)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.viewpagerindicator.CirclePageIndicator" on path: DexPathList[[zip file "/data/app/com.kicksexchange-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.kicksexchange-1, /vendor/lib, /system/lib]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
            at android.view.LayoutInflater.createView(LayoutInflater.java:559)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at com.kicksexchange.fragments.ProductDetail.onCreateView(ProductDetail.java:152)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5050)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
            at dalvik.system.NativeStart.main(Native Method)

0 个答案:

没有答案