任何人都能成功编译Yalintis的FlipViewPager?

时间:2018-01-06 17:20:49

标签: java android github android-library

我很生气地从here

编译Yalintis的图书馆

我每次都会收到错误。错误发生在,

  

com.yalantis.dracoagain.FriendsActivity $ FriendsAdapter.getPage(FriendsActivity.java:60)`

并且MainActivity的第60行是

holder.infoPage = getLayoutInflater().inflate(R.layout.friends_info, parent, false);

所以这意味着,它甚至无法设置视图。我确实在gradle(模块级别)中导入了库。

我真的想知道如何修复它。我遵循git中提到的每一步。

这是完整的错误logcat -

01-06 22:54:31.530 6541-6541/com.yalantis.dracoagain E/AndroidRuntime: FATAL EXCEPTION: main
   Process: com.yalantis.dracoagain, PID: 6541
   android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class com.yalantis.flip.sample.views.FontTextView
   Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class com.yalantis.flip.sample.views.FontTextView
   Caused by: java.lang.ClassNotFoundException: Didn't find class "com.yalantis.flip.sample.views.FontTextView" on path: DexPathList[[zip file "/data/app/com.yalantis.dracoagain-2/base.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.yalantis.dracoagain-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.yalantis.dracoagain-2/lib/x86, /system/lib, /vendor/lib]]
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
       at android.view.LayoutInflater.createView(LayoutInflater.java:609)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
       at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
       at com.yalantis.dracoagain.FriendsActivity$FriendsAdapter.getPage(FriendsActivity.java:60)
       at com.yalantis.flipviewpager.adapter.BaseFlipAdapter$MergeAdapter.getView(BaseFlipAdapter.java:124)
       at com.yalantis.flipviewpager.view.FlipViewPager.setAdapter(FlipViewPager.java:468)
       at com.yalantis.flipviewpager.adapter.BaseFlipAdapter.getView(BaseFlipAdapter.java:72)
       at android.widget.AbsListView.obtainView(AbsListView.java:2363)
       at android.widget.ListView.makeAndAddView(ListView.java:1970)
       at android.widget.ListView.fillDown(ListView.java:704)
       at android.widget.ListView.fillFromTop(ListView.java:765)
       at android.widget.ListView.layoutChildren(ListView.java:1744)
       at android.widget.AbsListView.onLayout(AbsListView.java:2162)
       at android.view.View.layout(View.java:17637)
       at android.view.ViewGroup.layout(ViewGroup.java:5575)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
       at android.view.View.layout(View.java:17637)
       at android.view.ViewGroup.layout(ViewGroup.java:5575)
       at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:443)
       at android.view.View.layout(View.java:17637)
       at android.view.ViewGroup.layout(ViewGroup.java:5575)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
       at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
       at android.view.View.layout(View.java:17637)
       at android.view.ViewGroup.layout(ViewGroup.java:5575)
       at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
       at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
       at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
       at android.view.View.layout(View.java:17637)
       at android.view.ViewGroup.layout(ViewGroup.java:5575)
       at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)

01-06 22:54:31.530 6541-6541/com.yalantis.dracoagain E/AndroidRuntime:     at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
       at com.android.internal.policy.DecorView.onLayout(DecorView.java:726)
       at android.view.View.layout(View.java:17637)
       at android.view.ViewGroup.layout(ViewGroup.java:5575)
       at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874)
       at android.view.Choreographer.doCallbacks(Choreographer.java:686)
       at android.view.Choreographer.doFrame(Choreographer.java:621)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860)
       at android.os.Handler.handleCallback(Handler.java:751)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6119)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

0 个答案:

没有答案