0
I’m having a problem doing Debug and generating a signed Apk, when I open the application is generated an error, I’m not able to figure out the solution to this error, in the simulator of Android works perfectly, but when I debug by cell phone it generates an error when opening the application.
FATAL EXCEPTION: main
Process: com.meuapp, PID: 6687
java.lang.RuntimeException: Unable to instantiate service com.meuapp.MyFirebaseInstanceIDService: java.lang.ClassNotFoundException:
Didn't find class "com.meuapp.MyFirebaseInstanceIDService" on path:
DexPathList[[zip file "/data/app/com.meuapp-1/base.apk", zip file "/data/app/com.meuapp-1/split_lib_dependencies_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_1_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_3_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_5_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_7_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_9_apk.apk"],
nativeLibraryDirectories=[/data/app/com.meuapp-1/lib/arm, /vendor/lib, /system/lib]]
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2880)
at android.app.ActivityThread.-wrap4(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1437)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.meuapp.MyFirebaseInstanceIDService" on path:
DexPathList[[zip file "/data/app/com.meuapp-1/base.apk", zip file "/data/app/com.meuapp-1/split_lib_dependencies_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_1_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_3_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_5_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_7_apk.apk",
zip file "/data/app/com.meuapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.meuapp-1/split_lib_slice_9_apk.apk"],
nativeLibraryDirectories=[/data/app/com.meuapp-1/lib/arm, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2877)
at android.app.ActivityThread.-wrap4(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1437)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Suppressed: java.lang.ClassNotFoundException: com.meuapp.MyFirebaseInstanceIDService
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
Can someone help me with this problem?
Have you checked whether the "Myfirebaseinstanceidservice" class actually exists in this "com.meuapp" package? Remembering that being in the folder does not mean being in the package.
– Grupo CDS Informática
It didn’t really exist in the package, I’m trying to include that package in my application, there’s some way to do this?
– José Leal Marques
Go to the Myfirebaseinstanceidservice class, and change her package, leaving only as with.meuapp
– Grupo CDS Informática