when I run my app, app died and occur classNotFoundException.
perhaps, gradle problem ?
compileSdkVersion =22
buildToolsVersion =21.1.2
minSdkVersion =19
targetSdkVersion =22
I think code problem.
settings, or gradle problem.
please advice for me.
logcat
FATAL EXCEPTION: main
Process: kr.co.iosystem.blackeyeonandroid, PID: 27947
java.lang.RuntimeException: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/kr.co.iosystem.blackeyeonandroid-1.apk"],nativeLibraryDirectories=[/data/app-lib/kr.co.iosystem.blackeyeonandroid-1, /system/lib, /system/lib/arm]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/kr.co.iosystem.blackeyeonandroid-1.apk"],nativeLibraryDirectories=[/data/app-lib/kr.co.iosystem.blackeyeonandroid-1, /system/lib, /system/lib/arm]]
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.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:502)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Related
I have tried every answer for this on Google, but none worked for me.
I have just created an app I Android studio and add .jar file and simply running it.
But the app crashes leaving with below error message.
FATAL EXCEPTION: main Process: com.vtek.cam_pwr_flsh_cntrl, PID: 4850
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.vtek.cam_pwr_flsh_cntrl/com.vtek.cam_pwr_flsh_cntrl.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.vtek.cam_pwr_flsh_cntrl.MainActivity" on path: DexPathList[[zip file "/data/app/com.vtek.cam_pwr_flsh_cntrl-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.vtek.cam_pwr_flsh_cntrl-2, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.vtek.cam_pwr_flsh_cntrl.MainActivity" on path: DexPathList[[zip file "/data/app/com.vtek.cam_pwr_flsh_cntrl-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.vtek.cam_pwr_flsh_cntrl-2, /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.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Check in your manifest file if you have declared the class as an activity.
If missing, do it.
Clean and REBUILD the code.
Hope this helps.
How to solve this error ?
Android studio 2.3.3
Ubuntu 14.04 LTS
androidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.midhilaj.ssfnewsapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.midhilaj.ssfnewsapp-1, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5121)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4681)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4621)
at android.app.ActivityThread.access$1300(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1433)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path: DexPathList[[zip file "/data/app/com.midhilaj.ssfnewsapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.midhilaj.ssfnewsapp-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.ActivityThread.installProvider(ActivityThread.java:5106)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4681)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4621)
at android.app.ActivityThread.access$1300(ActivityThread.java:165)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1433)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5391)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
First register your app on firebase console and follow the steps mentioned there remember to put the google-service.json file parallel to the app folder in your project.
After adding the Ion library to my project, I can't start my app in Android 4.4, everything higher works fine.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.swe.gruppe4.mockup2, PID: 3281
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.swe.gruppe4.mockup2/com.swe.gruppe4.mockup2.LoginActivity}: java.lang.ClassNotFoundException: Didn't find class "com.swe.gruppe4.mockup2.LoginActivity" on path: DexPathList[[zip file "/data/app/com.swe.gruppe4.mockup2-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.swe.gruppe4.mockup2-2, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.swe.gruppe4.mockup2.LoginActivity" on path: DexPathList[[zip file "/data/app/com.swe.gruppe4.mockup2-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.swe.gruppe4.mockup2-2, /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.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Application terminated.
I added Ion through the app's build.gradle as it is stated on the github, compile 'com.koushikdutta.ion:ion:2.+'.
As stated earlier, on higher Android versions it works fine.
It also works fine on a completely clean project with just adding Ion
I now fixed it myself.
I created a new project with the same package name and copied the app folder completely to the new project, it works fine there. Weird!
I have setup correctly the facebook SDK for facebook like button. It works fine on one phone (Android 4.3) but gives an exception on the other (Android 4.4.4)
The exception is as:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.compzets.popopics/com.compzets.popopics.ui.MainPagerActivity}: android.view.InflateException: Binary XML file line #80: Error inflating class com.facebook.widget.LikeView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2212)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
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:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #80: Error inflating class com.facebook.widget.LikeView
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.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.ActionBarActivityDelegateBase.setContentView(ActionBarActivityDelegateBase.java:228)
at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:102)
at com.compzets.popopics.ui.MainPagerActivity.onCreate(MainPagerActivity.java:58)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
... 11 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.widget.LikeView" on path: DexPathList[[zip file "/data/app/com.compzets.popopics-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.compzets.popopics-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)
... 22 more
It gives a ClassNotFoundException, I have no clue as to why it happens? And if there is an issue then why it isn't reflected on both phones.
I faced a similar issue some days back and the following solved it:
Removed compile 'com.facebook.android:facebook-android-sdk:3.21.1' from the dependencies in gradle
Synced it
Added the same dependency again
Again Synced it
Hope this works for you as well!
I've already read serveral Q&A's from SO and did not found a solution.
My problem is: I run my app from AndroidStudio and get the error bellow, then I run gradlew clean installDebug and code works just fine (outside AS, with NO changes).
I did NOT forgot to include my activity into AndroidManifest.
10-13 13:36:18.261 1457-1457/my.package E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: my.package, PID: 1457
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{my.package/my.package.activity.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "my.package.activity.MainActivity" on path: DexPathList[[zip file "/data/app/my.package-1.apk"],nativeLibraryDirectories=[/data/app-lib/my.package-1, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "my.package.activity.MainActivity" on path: DexPathList[[zip file "/data/app/my.package-1.apk"],nativeLibraryDirectories=[/data/app-lib/my.package-1, /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.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2101)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
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:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
I'm using Android Studio 0.8.12 and this is reproducible with real devices and emulator (Genymotion).
EDIT
I've tried both "full path" and "class name only" into my AndroidManifest file to declare activities. And it still doesn't explain (IMHO) why it works via command line with gradle.