【问题标题】:MLKit translate SDK crashes in release buildMLKit 翻译 SDK 在发布版本中崩溃
【发布时间】:2021-10-20 05:52:38
【问题描述】:

我们使用official guideline 在 Android 上通过 ML Kit 实现文本翻译功能。该库的当前版本是“com.google.mlkit:translate:16.1.2”。 它在调试版本中按预期工作,但在发布版本中崩溃并因本机代码崩溃:

致命信号 11 (SIGSEGV),代码 1 (SEGV_MAPERR),tid 5897 中的故障地址 0x78f4752a0a

如果我们将发布版本标记为可调试,则不会发生崩溃。

有什么想法会出错吗?

cmets 中请求的其他文件:

堆栈跟踪:

    --------- beginning of crash
2021-08-18 14:09:40.411 5897-5897 A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78f4752a0a in tid 5897 (homegate.mobile), pid 5897 (homegate.mobile)
2021-08-18 14:09:40.556 6304-6304 I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2021-08-18 14:09:40.556 979-979 I/tombstoned: received crash request for pid 5897
2021-08-18 14:09:40.564 6304-6304 I/crash_dump64: performing dump of process 5897 (target tid = 5897)
2021-08-18 14:09:40.570 5897-6189 I/Counters: exceeded sample count in FrameTime
2021-08-18 14:09:40.575 6304-6304 *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-08-18 14:09:40.576 6304-6304 Build fingerprint: 'google/sargo/sargo:11/RQ3A.210805.001.A1/7474174:user/release-keys'
2021-08-18 14:09:40.576 6304-6304 Revision: 'MP1.0'
2021-08-18 14:09:40.576 6304-6304 ABI: 'arm64'
2021-08-18 14:09:40.576 6304-6304 Timestamp: 2021-08-18 14:09:40+0200
2021-08-18 14:09:40.576 6304-6304 pid: 5897, tid: 5897, name: homegate.mobile  >>> ch.homegate.mobile <<<
2021-08-18 14:09:40.576 6304-6304 uid: 10072
2021-08-18 14:09:40.576 6304-6304 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x78f4752a0a
2021-08-18 14:09:40.576 6304-6304     x0  0000000000000000  x1  00000000000008fc  x2  000000788245bc71  x3  0000000000000000
2021-08-18 14:09:40.576 6304-6304     x4  0000000000000010  x5  00000079e5cf2df0  x6  0000007945c71120  x7  3cea0ea100000634
2021-08-18 14:09:40.576 6304-6304     x8  00000079c5c93070  x9  00000078f4755c6d  x10 0000000000000000  x11 00000078f47520c8
2021-08-18 14:09:40.576 6304-6304     x12 0000000000000009  x13 0000000000000000  x14 0000000000000061  x15 000000000000000c
2021-08-18 14:09:40.576 6304-6304     x16 00000078824caef8  x17 0000007b9607ead4  x18 0000007b9b5f4000  x19 0000007fe00de598
2021-08-18 14:09:40.576 6304-6304     x20 0000000000000000  x21 00000079b5cb3f70  x22 00000079c5c93070  x23 00000079b5cb3f78
2021-08-18 14:09:40.576 6304-6304     x24 0000000000000009  x25 00000000000004a1  x26 0000000000000012  x27 000000000000005f
2021-08-18 14:09:40.576 6304-6304     x28 0000007975d22ee0  x29 0000000000000000
2021-08-18 14:09:40.576 6304-6304     lr  0000007882485964  sp  0000007fe00de3a0  pc  00000078824867c0  pst 0000000060000000
2021-08-18 14:09:40.581 5897-6189 I/Counters: exceeded sample count in FrameTime
2021-08-18 14:09:40.761 1022-1239 D/VSC: @ 92931.790: [WO] isFlat() nearest_rotation: 0, flat_angle: 65
2021-08-18 14:09:40.762 1022-1239 D/VSC: @ 92931.790: [WO] orientation angle 17, orientation 0
2021-08-18 14:09:40.762 1022-1239 D/VSC: @ 92931.790: [WO] rejected by isOrientationAngleAcceptable
2021-08-18 14:09:40.861 6304-6304 backtrace:
2021-08-18 14:09:40.861 6304-6304       #00 pc 000000000003c7c0  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #01 pc 000000000003b960  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #02 pc 000000000003bb48  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #03 pc 000000000003bafc  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #04 pc 0000000000036c98  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #05 pc 00000000000324a4  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #06 pc 0000000000031b5c  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/lib/arm64/liblanguage_id_jni.so (Java_com_google_mlkit_nl_languageid_internal_LanguageIdentificationJni_nativeIdentifyLanguage+100) (BuildId: 859ec0ec2000a39e6ae8ed42e1704f46)
2021-08-18 14:09:40.861 6304-6304       #07 pc 000000000007a6a8  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.odex (art_jni_trampoline+168)
2021-08-18 14:09:40.861 6304-6304       #08 pc 0000000000133564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #09 pc 00000000001a8a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #10 pc 000000000031831c  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #11 pc 000000000030e648  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #12 pc 0000000000682f88  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtualQuick+672) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #13 pc 0000000000131594  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #14 pc 0000000000e077fc  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (qk.d.call+124)
2021-08-18 14:09:40.861 6304-6304       #15 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #16 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #17 pc 0000000000ae1432  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (com.google.android.gms.internal.ads.f20.run+1686)
2021-08-18 14:09:40.861 6304-6304       #18 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #19 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #20 pc 0000000000e00892  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (qh.q.run+794)
2021-08-18 14:09:40.861 6304-6304       #21 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #22 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #23 pc 0000000000e0d854  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (rk.a.execute+52)
2021-08-18 14:09:40.861 6304-6304       #24 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #25 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #26 pc 0000000000de4294  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ok.o.execute+16)
2021-08-18 14:09:40.861 6304-6304       #27 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #28 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #29 pc 0000000000de4034  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ok.k.a+56)
2021-08-18 14:09:40.861 6304-6304       #30 pc 0000000000683228  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtualQuick+1344) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #31 pc 0000000000131594  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #32 pc 0000000000cecc44  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (com.google.mlkit.common.sdkinternal.a.a+124)
2021-08-18 14:09:40.861 6304-6304       #33 pc 0000000000683228  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtualQuick+1344) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #34 pc 0000000000131594  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #35 pc 000000000039286a  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ch.homegate.mobile.main.usecase.MlKitTranslationUseCaseImpl.a+482)
2021-08-18 14:09:40.861 6304-6304       #36 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #37 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #38 pc 000000000036c462  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ch.homegate.mobile.main.detail.DetailViewModel.d+2602)
2021-08-18 14:09:40.861 6304-6304       #39 pc 000000000067f740  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #40 pc 000000000012d994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #41 pc 000000000036a0ae  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (ch.homegate.mobile.main.detail.DetailViewModel$loadDetail$1$invokeSuspend$$inlined$collect$1.emit+774)
2021-08-18 14:09:40.861 6304-6304       #42 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #43 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #44 pc 0000000001339b64  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (kotlinx.coroutines.flow.FlowKt__ErrorsKt$catchImpl$$inlined$collect$1.emit+128)
2021-08-18 14:09:40.861 6304-6304       #45 pc 000000000067e21c  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1808) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #46 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #47 pc 0000000001337d90  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (kotlinx.coroutines.flow.FlowKt__ChannelsKt.a+284)
2021-08-18 14:09:40.861 6304-6304       #48 pc 000000000067f740  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+1224) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #49 pc 000000000012d994  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #50 pc 0000000001337c42  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend+22)
2021-08-18 14:09:40.861 6304-6304       #51 pc 0000000000305c44  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.6432830707213048161)+268) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.861 6304-6304       #52 pc 000000000066b24c  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #53 pc 000000000013cff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #54 pc 00000000021b00d4  /memfd:jit-cache (deleted) (offset 0x2000000) (kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith+276)
2021-08-18 14:09:40.862 6304-6304       #55 pc 0000000000133564  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #56 pc 00000000001a8a78  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+200) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #57 pc 000000000031831c  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+376) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #58 pc 000000000030e648  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+996) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #59 pc 000000000067df14  /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1032) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #60 pc 000000000012da14  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #61 pc 00000000013a739c  /data/app/~~agM6IoX_2TvQjEyG25sAfQ==/ch.homegate.mobile-VNjMAk_4GEv45vV5JSrgmw==/oat/arm64/base.vdex (sl.p0.run+244)
2021-08-18 14:09:40.862 6304-6304       #62 pc 0000000000305c44  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.6432830707213048161)+268) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #63 pc 000000000066b24c  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+780) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #64 pc 000000000013cff8  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #65 pc 0000000000634c8c  /system/framework/arm64/boot-framework.oat (android.os.Handler.dispatchMessage+76) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304       #66 pc 00000000006381ec  /system/framework/arm64/boot-framework.oat (android.os.Looper.loop+1516) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304       #67 pc 00000000003fbaa0  /system/framework/arm64/boot-framework.oat (android.app.ActivityThread.main+752) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304       #68 pc 00000000001337e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #69 pc 00000000001a8a94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #70 pc 0000000000555748  /apex/com.android.art/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1364) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #71 pc 00000000004d4ef0  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #72 pc 00000000000896f4  /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+180) (BuildId: ceb5e62f6d91c45ea99526daec5879eba39c6a54)
2021-08-18 14:09:40.862 6304-6304       #73 pc 000000000088bfd8  /system/framework/arm64/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+136) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304       #74 pc 0000000000894708  /system/framework/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2280) (BuildId: c796a34e8ce906ec2c393327c9700abd6e60ca15)
2021-08-18 14:09:40.862 6304-6304       #75 pc 00000000001337e8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #76 pc 00000000001a8a94  /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+228) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #77 pc 0000000000554184  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+448) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #78 pc 0000000000554638  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+92) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #79 pc 0000000000438b08  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+656) (BuildId: 0183cc6150704cdc371a87b659800e56)
2021-08-18 14:09:40.862 6304-6304       #80 pc 0000000000099424  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+124) (BuildId: 1dec5134a09522f9c83c48dae0aec3be)
2021-08-18 14:09:40.862 6304-6304       #81 pc 00000000000a08b0  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+836) (BuildId: 1dec5134a09522f9c83c48dae0aec3be)
2021-08-18 14:09:40.862 6304-6304       #82 pc 0000000000003580  /system/bin/app_process64 (main+1336) (BuildId: 8b041fc279d5108900e48324bafa5142)
2021-08-18 14:09:40.862 6304-6304       #83 pc 000000000004988c  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 49090ae59e6ae37f8beae53c551820ad)
2021-08-18 14:09:40.869 3080-3104 D/DeviceStateHelper: Audo mode: 0
2021-08-18 14:09:41.170 1639-6307 W/ActivityTaskManager:   Force finishing activity ch.homegate.mobile/.main.MainActivity

build.gradle

buildscript {
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-allopen:$Versions.kotlin"
    }
}

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'kotlin-parcelize'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: "kotlin-allopen"

android {
    compileSdkVersion rootProject.compileSdk

    defaultConfig {
        applicationId "ch.homegate.mobile"
        minSdkVersion rootProject.minSdk
        targetSdkVersion rootProject.targetSdk
        versionCode rootProject.versionCode
        versionName rootProject.versionName

        vectorDrawables.useSupportLibrary = true

        resConfigs "de", "en", "it", "fr"

        lintOptions {
            checkReleaseBuilds false
        }

        testInstrumentationRunnerArguments clearPackageData: 'true'
    }

    testOptions {
        execution "ANDROIDX_TEST_ORCHESTRATOR"
        unitTests {
            returnDefaultValues true
            includeAndroidResources true
            all {
                jvmArgs '-noverify'
                reports {
                    junitXml.enabled = true
                    html.enabled = true
                }
            }
        }
    }

    buildFeatures {
        viewBinding true
    }

    compileOptions {
        sourceCompatibility JAVA_VERSION
        targetCompatibility JAVA_VERSION
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }

    lintOptions {
        abortOnError false
        warning 'RestrictedApi'
    }

    buildTypes {
        release {
            signingConfig releaseSigningConfig
            minifyEnabled true
            zipAlignEnabled true
        }
        debug {
            ext.enableCrashlytics = false
            ext.alwaysUpdateBuildId = false
            debuggable true
            minifyEnabled false
        }
    }

    bundle {
        language {
            // Specifies that the app bundle should not support
            // configuration APKs for language resources. These
            // resources are instead packaged with each base and
            // dynamic feature APK.
            enableSplit = false
        }
        density {
            // This property is set to true by default.
            enableSplit = true
        }
        abi {
            // This property is set to true by default.
            enableSplit = true
        }
    }

    packagingOptions {
        // added this line to be able to create release apk from android studio
        exclude 'classes.dex'
        pickFirst("META-INF/atomicfu.kotlin_module")
        pickFirst("META-INF/ui_release.kotlin_module")
    }
}

dependencies {
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:${Dependencies.kotlinx}"
    implementation "org.jetbrains.kotlin:kotlin-reflect:${Dependencies.kotlin}"
    debugImplementation "com.squareup.okhttp3:logging-interceptor:${Dependencies.okhttp}"

    implementation "pub.devrel:easypermissions:${Dependencies.easypermissions}"

    implementation platform("com.google.firebase:firebase-bom:${Dependencies.firebaseBoM}")
    implementation "com.google.firebase:firebase-config"
    implementation "com.google.firebase:firebase-perf-ktx"
    implementation "com.google.android.gms:play-services-location:${Dependencies.googlePlayServicesLocation}"

    implementation "com.google.android.gms:play-services-auth:${Dependencies.googlePlayServicesAuth}"
    implementation "com.google.android.gms:play-services-maps:${Dependencies.googlePlayServicesMaps}"
    implementation "com.google.maps.android:android-maps-utils:${Dependencies.mapsUtils}"

    implementation "com.google.android.material:material:${Dependencies.material}"
    implementation "androidx.constraintlayout:constraintlayout:${Dependencies.constraintLayout}"
    implementation "androidx.recyclerview:recyclerview:${Dependencies.recyclerView}"
    implementation "androidx.cardview:cardview:${Dependencies.cardView}"
    implementation "androidx.recyclerview:recyclerview-selection:${Dependencies.recyclerViewSelection}"
    implementation "androidx.swiperefreshlayout:swiperefreshlayout:${Dependencies.swipeToRefresh}"
    implementation "androidx.dynamicanimation:dynamicanimation:${Dependencies.animations}"

    implementation "androidx.work:work-runtime-ktx:${Dependencies.workManager}"
    androidTestImplementation "androidx.work:work-testing:${Dependencies.workManager}"

    implementation "androidx.core:core-ktx:${Dependencies.coreKtx}"
    implementation "androidx.activity:activity-ktx:${Dependencies.activityKtx}"
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:${Dependencies.livedata}"
    implementation("androidx.lifecycle:lifecycle-extensions:${Dependencies.lifecycle}") {
        exclude group: 'com.google.code.gson'
    }

    kapt "androidx.lifecycle:lifecycle-common-java8:${Dependencies.lifecycle}"

    implementation "androidx.paging:paging-runtime:${Dependencies.pagingVersion}"

    implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${Dependencies.jacksonVersion}"
    implementation "com.fasterxml.jackson.core:jackson-databind:${Dependencies.jacksonVersion}"
    implementation "com.fasterxml.jackson.core:jackson-annotations:${Dependencies.jacksonVersion}"
    implementation "com.fasterxml.jackson.core:jackson-core:${Dependencies.jacksonVersion}"
    implementation "com.squareup.retrofit2:converter-jackson:${Dependencies.retrofitJacksonVersion}"

    implementation "com.google.android.flexbox:flexbox:${Dependencies.flexboxVersion}"

    implementation "androidx.preference:preference-ktx:${Dependencies.preferenceManager}"

    implementation("com.google.firebase:firebase-crashlytics") {
        transitive = true
    }

    implementation "com.github.PGrube26:RangeSeekBar:${Dependencies.rangeBar}"
    implementation "com.facebook.shimmer:shimmer:${Dependencies.facebookShimmer}"
    implementation "com.jakewharton.threetenabp:threetenabp:${Dependencies.threetenabp}"

    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${Dependencies.viewModelScope}"
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:${Dependencies.lifecycleScope}"

    implementation "com.github.bumptech.glide:glide:${Dependencies.glide}"
    implementation "com.jakewharton.timber:timber:${Dependencies.timberVersion}"

    implementation "org.locationtech.jts:jts-core:${Dependencies.jts}"

    implementation "com.github.chrisbanes:PhotoView:${Dependencies.photoView}"

    implementation "uk.co.samuelwall:material-tap-target-prompt:${Dependencies.materialTapTargetPrompt}"
    implementation "androidx.test.espresso:espresso-idling-resource:${Dependencies.espressoVersion}"

    implementation "com.google.mlkit:language-id:${Dependencies.mlLanguage}"
    implementation "com.google.mlkit:translate:${Dependencies.mlTranslate}"

    implementation "com.android.installreferrer:installreferrer:${Dependencies.installReferrer}"
    implementation "com.comscore:android-analytics:${Dependencies.comscore}"

    implementation "com.google.android.gms:play-services-ads:${Dependencies.ads}"
    implementation "com.android.support:support-annotations:${Dependencies.supportAnnotation}"

    implementation "com.yarolegovich:discrete-scrollview:${Dependencies.discreteScrollView}"

    implementation("com.appelium:feedback:2.1.1:release@aar") {
        transitive = true
    }
}

关于设备信息,它在 Pixel 3a(Android 版本 11)上进行了测试

【问题讨论】:

  • 这是不可重现的。请提供完整的堆栈跟踪;您可能缺少 R8 的规则。
  • 感谢您的报告。您能否提供更多信息供我们调试? 1. 你的 build.gradle 让我们知道你是如何构建应用程序的 2. 关于错误的完整堆栈跟踪 3. 设备信息和 api 级别,它也只发生在一台设备上吗?谢谢
  • 嘿 @jack 和 @martin-zeitler 感谢您的 cmets。我添加了堆栈跟踪、build.gradle 和设备信息以及操作系统版本。这发生在多个设备上。我还怀疑我们缺少 R8 的规则,但我不确定是哪些规则,因为官方文档中没有提到任何内容。有什么想法我们可以调查这个吗?我们设法通过避免删除 postprocessing 块内未使用的代码来为此崩溃创建解决方法。
  • 嗨 Stevan,language id SDK 内部似乎发生了崩溃。你用的是什么版本的language id?您还可以解释更多关于avoid removing unused code 的信息吗?也许粘贴出那个代码是什么?谢谢
  • 对于语言 id,我们发布了一个新版本17.0.0,你可以试试吗? maven.google.com/web/…

标签: android google-mlkit


【解决方案1】:

17.0.0 也崩溃了

解决方法: 将套件的独立版本替换为来自 Google Play 服务的动态模型。 IE。在 Gradle 依赖项中将 'com.google.mlkit:language-id:17.0.0' 替换为 'com.google.android.gms:play-services-mlkit-language-id:16.0.0-beta1'。

更多信息: https://developers.google.com/ml-kit/language/identification/android

【讨论】:

    【解决方案2】:

    谷歌posted workaround for this issue

    对于现有 SDK 的临时解决方法,您需要添加此规则

    • 对于语言 ID 16.1.1
    -keep class com.google.mlkit.nl.languageid.internal.LanguageIdentificationJni { *; }
    
    • 对于语言 ID 17.0.0+
    -keep class com.google.mlkit.nl.languageid.internal.ThickLanguageIdentifier { *; }
    
    【解决方案3】:

    在 17.0.0 之前是否出现同样的崩溃错误?你能把错误日志分享给我看看吗?

    很高兴看到“com.google.android.gms:play-services-mlkit-language-id:16.0.0-beta1”可以通过从 Google Play 服务下载模型来节省 APK 大小。

    【讨论】:

      【解决方案4】:

      这似乎是 R8 优化器的问题。

      我为此发布在 R8 问题跟踪器上。

      https://issuetracker.google.com/issues/203573699

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-01-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-15
        • 1970-01-01
        • 2017-03-15
        • 2021-03-18
        相关资源
        最近更新 更多