APK不能在手机上工作,但App在Android Studio中工作正常

时间:2017-03-28 10:09:46

标签: android android-emulator apk

我有一个在Android Studio中没有问题的应用程序,但是当我构建apk然后安装它显示奇怪的行为时:

1-当安装应用程序时,手机会显示通知我的应用程序不需要任何一个权限(这不是真的,我的应用程序可以识别)

2-安装和运行后,应用程序崩溃,没有显示任何一个屏幕。

我在想,也许可能是清单的问题,但正如我在模拟器中说的那样没有问题。我第一次看到这种行为。知道怎么解决吗?

03-28 13:15:22.851 7334-7334/com.itelma.tele D/AndroidRuntime: Shutting down VM
03-28 13:15:22.851 7334-7334/com.itelma.tele E/AndroidRuntime: FATAL EXCEPTION: main
                                                               Process: com.itelma.tele, PID: 7334
                                                               java.lang.RuntimeException: Unable to instantiate service com.itelma.tele.API_AC.FCMInstanceIdService: java.lang.ClassNotFoundException: Didn't find class "com.itelma.tele.API_AC.FCMInstanceIdService" on path: DexPathList[[zip file "/data/app/com.itelma.tele-2/base.apk"],nativeLibraryDirectories=[/data/app/com.itelma.tele-2/lib/arm, /data/app/com.itelma.tele-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
                                                                   at android.app.ActivityThread.handleCreateService(ActivityThread.java:3841)
                                                                   at android.app.ActivityThread.access$2100(ActivityThread.java:229)
                                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1909)
                                                                   at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                   at android.os.Looper.loop(Looper.java:148)
                                                                   at android.app.ActivityThread.main(ActivityThread.java:7325)
                                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                                Caused by: java.lang.ClassNotFoundException: Didn't find class "com.itelma.tele.API_AC.FCMInstanceIdService" on path: DexPathList[[zip file "/data/app/com.itelma.tele-2/base.apk"],nativeLibraryDirectories=[/data/app/com.itelma.tele-2/lib/arm, /data/app/com.itelma.tele-2/base.apk!/lib/armeabi-v7a, /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:3838)
                                                                   at android.app.ActivityThread.access$2100(ActivityThread.java:229) 
                                                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1909) 
                                                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                   at android.os.Looper.loop(Looper.java:148) 
                                                                   at android.app.ActivityThread.main(ActivityThread.java:7325) 
                                                                   at java.lang.reflect.Method.invoke(Native Method) 
                                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                                Suppressed: java.lang.ClassNotFoundException: com.itelma.tele.API_AC.FCMInstanceIdService
                                                                   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)
                                                                        ... 10 more
                                                                Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

0 个答案:

没有答案