这是我从github下载的库的链接。
https://github.com/astuetz/PagerSlidingTabStrip没有运行.bat文件。我已经删除了所有的链接标记。应用程序正在崩溃
下面是错误日志:
05-03 16:19:29.348: E/AndroidRuntime(3973): FATAL EXCEPTION: main
05-03 16:19:29.348: E/AndroidRuntime(3973): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.astuetz.viewpager.extensions.sample/com.astuetz.viewpager.extensions.sample.MainActivity}: java.lang.ClassNotFoundException: com.astuetz.viewpager.extensions.sample.MainActivity
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.os.Handler.dispatchMessage(Handler.java:99)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.os.Looper.loop(Looper.java:137)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-03 16:19:29.348: E/AndroidRuntime(3973): at java.lang.reflect.Method.invokeNative(Native Method)
05-03 16:19:29.348: E/AndroidRuntime(3973): at java.lang.reflect.Method.invoke(Method.java:511)
05-03 16:19:29.348: E/AndroidRuntime(3973): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
05-03 16:19:29.348: E/AndroidRuntime(3973): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
05-03 16:19:29.348: E/AndroidRuntime(3973): at dalvik.system.NativeStart.main(Native Method)
05-03 16:19:29.348: E/AndroidRuntime(3973): Caused by: java.lang.ClassNotFoundException: com.astuetz.viewpager.extensions.sample.MainActivity
05-03 16:19:29.348: E/AndroidRuntime(3973): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
05-03 16:19:29.348: E/AndroidRuntime(3973): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
05-03 16:19:29.348: E/AndroidRuntime(3973): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.Instrumentation.newActivity(Instrumentation.java:1025)
05-03 16:19:29.348: E/AndroidRuntime(3973): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871)
05-03 16:19:29.348: E/AndroidRuntime(3973): ... 11 more
我也遇到过类似的问题。确保已将库包含到主项目中。然后,您的链接显示它也需要包含nineoldandroids库。你写进去了吗?
同时,确保您已将相应的库项目标记为libraries