我目前在android项目中遇到一个奇怪的问题。当我调试应用程序或创建签名的APK并将其安装在手机上时,我的应用程序可以正常运行。但是,将其发布到商店并从那里安装后,该应用将无法打开。它将以黑屏打开,并在我测试过的所有物理设备上将其最小化。我可以使用bluestack从Play商店下载文件,并且可以正常运行,似乎是无法打开的物理设备。
我目前在我的开发控制台中看到此错误。
java.lang.ClassNotFoundException
dalvik.system.BaseDexClassLoader.findClass
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2018.3.14f1
Device model : samsung SM-G950F
Device fingerprint: samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXS5DSJ1:user/release-keys
Caused by
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3574)
at android.app.ActivityThread.access$1300 (ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1796)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:7050)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateReceiver (AppComponentFactory.java:84)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3567)
只需添加一下。.我还看到了这些崩溃日志:
pid: 0, tid: 0 >>> club.piratetycoon.idleclicker <<<
backtrace:
#00 pc 0000000000021d54 /system/lib64/libc.so (abort+124)
#01 pc 00000000000a29dc /system/lib64/libc.so (ifree+1212)
#02 pc 00000000000a2b08 /system/lib64/libc.so (je_free+120)
#03 pc 00000000007dc058 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#04 pc 00000000007d7894 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#05 pc 00000000007d7324 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#06 pc 00000000007d5c48 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#07 pc 00000000007d912c /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#08 pc 00000000007d8c10 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#09 pc 00000000007d8730 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#10 pc 00000000007d5414 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#11 pc 00000000004b2cac /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#12 pc 00000000002c1cf0 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#13 pc 000000000000d05c /system/bin/app_process64 (art::SignalChain::Handler(int, siginfo*, void*)+348)
#14 pc 000000000000069c [vdso:0000007a1eec6000]
#15 pc 00000000005356e0 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#16 pc 0000000000014d74 /system/bin/linker64 (__dl__Z18do_dl_iterate_phdrPFiP12dl_phdr_infomPvES1_+76)
#17 pc 00000000000145e0 /system/bin/linker64 (__loader_dl_iterate_phdr+48)
#18 pc 0000000000000f90 /system/lib64/libdl.so (dl_iterate_phdr+8)
#19 pc 00000000005355e8 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#20 pc 0000000000502afc /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#21 pc 0000000000318580 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#22 pc 00000000002bf9a4 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#23 pc 00000000002c0040 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#24 pc 00000000002bb090 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/split_config.arm64_v8a.apk
#25 pc 000000000002282c /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/oat/arm64/base.odex (com.unity3d.player.GoogleVrProxy.isQuiting [DEDUPED]+124)
#26 pc 0000000000561f88 /system/lib64/libart.so (art_quick_invoke_stub+584)
#27 pc 00000000000d0140 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#28 pc 00000000002865e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#29 pc 00000000002805a4 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#30 pc 0000000000532578 /system/lib64/libart.so (MterpInvokeDirect+296)
#31 pc 0000000000554714 /system/lib64/libart.so (ExecuteMterpImpl+14484)
#32 pc 000000000040999c /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/oat/arm64/base.vdex (com.unity3d.player.UnityPlayer.c)
#33 pc 000000000025a0a0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.783209430+496)
#34 pc 000000000025fc20 /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+216)
#35 pc 0000000000280588 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+920)
#36 pc 000000000053273c /system/lib64/libart.so (MterpInvokeStatic+204)
#37 pc 0000000000554794 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#38 pc 000000000040915c /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/oat/arm64/base.vdex (com.unity3d.player.UnityPlayer$e$2.queueIdle+144)
#39 pc 000000000025a0a0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.783209430+496)
#40 pc 0000000000521978 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
#41 pc 000000000056b0fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#42 pc 0000000000b2ac3c /system/framework/arm64/boot-framework.oat (android.os.MessageQueue.next+940)
#43 pc 0000000000b27ecc /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+636)
#44 pc 000000000056224c /system/lib64/libart.so (art_quick_invoke_static_stub+604)
#45 pc 00000000000d0160 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+232)
#46 pc 00000000002865e8 /system/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+344)
#47 pc 00000000002805a4 /system/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+948)
#48 pc 000000000053273c /system/lib64/libart.so (MterpInvokeStatic+204)
#49 pc 0000000000554794 /system/lib64/libart.so (ExecuteMterpImpl+14612)
#50 pc 00000000004093b8 /data/app/club.piratetycoon.idleclicker-KgdTpPx5Q4L5LuUEyrUBvw==/oat/arm64/base.vdex (com.unity3d.player.UnityPlayer$e.run+64)
#51 pc 000000000025a0a0 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEb.llvm.783209430+496)
#52 pc 0000000000521978 /system/lib64/libart.so (artQuickToInterpreterBridge+1032)
#53 pc 000000000056b0fc /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#54 pc 0000000000561f88 /system/lib64/libart.so (art_quick_invoke_stub+584)
#55 pc 00000000000d0140 /system/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200)
#56 pc 00000000004682d8 /system/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
#57 pc 00000000004693a0 /system/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue*)+424)
#58 pc 0000000000494c98 /system/lib64/libart.so (art::Thread::CreateCallback(void*)+1120)
#59 pc 0000000000084dc0 /system/lib64/libc.so (__pthread_start(void*)+208)
#60 pc 0000000000023a4c /system/lib64/libc.so (__start_thread+68)
答案 0 :(得分:0)
正如我所看到的,这里的问题与firebase API有关。请将您的应用Firebase更新为生产密钥,以便它可以在Play商店中发布的生产应用中运行。
change dev key to ---> production key
答案 1 :(得分:0)
正如@hosseinamini所指出的,正是导致崩溃的原因。当我将apk上传到Playstore后,崩溃消失了。