astuetz / PagerSlidingTabStrip

An interactive indicator to navigate between the different pages of a ViewPager
139 stars 44 forks source link

Errors when importing #78

Open RealPetChicken opened 10 years ago

RealPetChicken commented 10 years ago

there was around 300 errors when importing to eclipse, it went down to 37 after adding android-support-v4.jar into the libraries external jars.

Any help would be appreciated, just a noob in the learning process.

RealPetChicken commented 10 years ago

I fixed it by adding android-support-v4.jar for both library and PagerSlidingTabStrip, and then in it added the missing library under android.

I was actually finally able to run it and install it on my nexus 5, but it crashes, the log cats shows the following:

03-06 15:07:11.729: W/dalvikvm(28818): Unable to resolve superclass of Lcom/astuetz/viewpager/extensions/sample/MainActivity; (30) 03-06 15:07:11.729: W/dalvikvm(28818): Link of class 'Lcom/astuetz/viewpager/extensions/sample/MainActivity;' failed 03-06 15:07:11.729: D/AndroidRuntime(28818): Shutting down VM 03-06 15:07:11.729: W/dalvikvm(28818): threadid=1: thread exiting with uncaught exception (group=0x41582ba8) 03-06 15:07:11.729: E/AndroidRuntime(28818): FATAL EXCEPTION: main 03-06 15:07:11.729: E/AndroidRuntime(28818): Process: com.astuetz.viewpager.extensions.sample, PID: 28818 03-06 15:07:11.729: E/AndroidRuntime(28818): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.astuetz.viewpager.extensions.sample/com.astuetz.viewpager.extensions.sample.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.astuetz.viewpager.extensions.sample.MainActivity" on path: DexPathList[[zip file "/data/app/com.astuetz.viewpager.extensions.sample-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.astuetz.viewpager.extensions.sample-1, /vendor/lib, /system/lib]] 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.ActivityThread.access$800(ActivityThread.java:135) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.os.Handler.dispatchMessage(Handler.java:102) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.os.Looper.loop(Looper.java:136) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.ActivityThread.main(ActivityThread.java:5017) 03-06 15:07:11.729: E/AndroidRuntime(28818): at java.lang.reflect.Method.invokeNative(Native Method) 03-06 15:07:11.729: E/AndroidRuntime(28818): at java.lang.reflect.Method.invoke(Method.java:515) 03-06 15:07:11.729: E/AndroidRuntime(28818): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 03-06 15:07:11.729: E/AndroidRuntime(28818): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 03-06 15:07:11.729: E/AndroidRuntime(28818): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:126) 03-06 15:07:11.729: E/AndroidRuntime(28818): at dalvik.system.NativeStart.main(Native Method) 03-06 15:07:11.729: E/AndroidRuntime(28818): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.astuetz.viewpager.extensions.sample.MainActivity" on path: DexPathList[[zip file "/data/app/com.astuetz.viewpager.extensions.sample-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.astuetz.viewpager.extensions.sample-1, /vendor/lib, /system/lib]] 03-06 15:07:11.729: E/AndroidRuntime(28818): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-06 15:07:11.729: E/AndroidRuntime(28818): at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 03-06 15:07:11.729: E/AndroidRuntime(28818): at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.Instrumentation.newActivity(Instrumentation.java:1061) 03-06 15:07:11.729: E/AndroidRuntime(28818): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112) 03-06 15:07:11.729: E/AndroidRuntime(28818): ... 12 more

RealPetChicken commented 10 years ago

Okay, i think i fixed it. under properties > java build path > order and export, i checked android support v4.jar. Then cleaned up the project, and success, no more errors, and it runs on my nexus with no problem.

C00354 commented 10 years ago

thanks alot. It totally solved the same issue I faced.

JLucky commented 9 years ago

Nice, it solved my problem.

wepy2049 commented 9 years ago

Thank you very much

RuynLe commented 8 years ago

Thanks you, it solved my problem.