Unable to get provider com.google.firebase.provider.FirebaseInitProvider? - android

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.

Related

FATAL EXCEPTION : unable to instantiate activity componentInfo in android studio

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.

app is died, Occur ClassNotFoundException on android

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) 

Error ClassNotFoundException when downloaded from Google Play store on some devices

I have got a problem involving ClassNotFoundException. When i "Run as
android application" from eclipse it works fine, but when i download
it from Google Play (same source code but "Exported as signed app") it
crashes with the following stacktrace:
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.xxxx.xxxxxx./com.xxxx.xxxxxx..SplashActivity}:
java.lang.ClassNotFoundException: Didn't find class
"com.xxxx.xxxxxx..SplashActivity" on path: DexPathList[[zip
file
"/mnt/asec/com.xxxx.xxxxxx.-1/pkg.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]] at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2277)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2403)
at android.app.ActivityThread.access$600(ActivityThread.java:165) at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)
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.xxxx.xxxxxx..SplashActivity" on path: DexPathList[[zip
file
"/mnt/asec/com.xxxx.xxxxxx.-1/pkg.apk"],nativeLibraryDirectories=[/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.Instrumentation.newActivity(Instrumentation.java:1123) at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
... 11 more
Try Cleaning the project and export it once more to google play.

Error only in exported APK: Unable to instantiate activity ComponentInfo

When I run my app directly from Android Developer Tools (ADT), it works fine. However, when I export it to an APK file and install it, I get the following error:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{my.app/my.app.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "my.app.MainActivity" on path: DexPathList[[zip file "/data/app/my.app-2.apk"],nativeLibraryDirectories=[/data/app-lib/my.app-2, /vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2187)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2311)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1293)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5214)
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:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "my.app.MainActivity" on path: DexPathList[[zip file "/data/app/my.app-2.apk"],nativeLibraryDirectories=[/data/app-lib/my.app-2, /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.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2178)
... 11 more
The problem seemed to be a bug in ADT. Manually doing a clean via Project -> Clean and then re-exporting the APK fixed the problem.

ClassNotFoundException inside Google-Analytics from inside Google-Play-Services

I got a strange crash in my app and the new Analytics from inside Google-Play-Services - this bug seems to be really rare, but I really would like to know what is going on there.
java.lang.RuntimeException: Unable to instantiate receiver com.google.analytics.tracking.android.AnalyticsReceiver: java.lang.ClassNotFoundException: Didn't find class "com.google.analytics.tracking.android.AnalyticsReceiver" on path: /mnt/asec/org.ligi.passandroid-1/pkg.apk
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2375)
at android.app.ActivityThread.access$1500(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1322)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5095)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.analytics.tracking.android.AnalyticsReceiver" on path: /mnt/asec/org.ligi.passandroid-1/pkg.apk
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:2370)
... 10 more

Categories

Resources