'java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;' Error on Mixpanel
'java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;' Error on Mixpanel
我最近在我的 flutter 移动应用程序中集成了 mixpanel。起初我们没有问题。但是在使用一段时间后,我无法再启动该应用程序,并显示以下错误:
E/flutter (29702): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;
E/flutter (29702): at com.mixpanel.android.mpmetrics.MixpanelAPI.$jacocoInit(Unknown Source:13)
E/flutter (29702): at com.mixpanel.android.mpmetrics.MixpanelAPI.<clinit>(Unknown Source:0)
E/flutter (29702): at com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance(Unknown Source:0)
E/flutter (29702): at com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.handleInitialize(MixpanelFlutterPlugin.java:182)
E/flutter (29702): at com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.onMethodCall(MixpanelFlutterPlugin.java:57)
E/flutter (29702): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/flutter (29702): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/flutter (29702): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/flutter (29702): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (29702): at android.os.MessageQueue.next(MessageQueue.java:386)
E/flutter (29702): at android.os.Looper.loop(Looper.java:175)
E/flutter (29702): at android.app.ActivityThread.main(ActivityThread.java:7625)
E/flutter (29702): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (29702): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
E/flutter (29702): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
E/flutter (29702): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jacoco.agent.rt.internal_8ff85ea.Offline" on path: DexPathList[[zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.runner.jar", zip file "/data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/base.apk"],nativeLibraryDirectories=[/data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/lib/arm64, /data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
E/flutter (29702): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
E/flutter (29702): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/flutter (29702): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/flutter (29702): ... 15 more
E/flutter (29702):
F/flutter (29702): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
F/libc (29702): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 29702 (ph.dudu.duduph), pid 29702 (ph.dudu.duduph)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'HUAWEI/INE-LX2/HWINE:9/HUAWEIINE-LX2/9.1.0.318C636:user/release-keys'
Revision: '0'
ABI: 'arm64'
Happend: 'Fri Oct 8 19:44:13 2021
'
SYSVMTYPE: Art
APPVMTYPE: Art
pid: 29702, tid: 29702, name: ph.dudu.duduph >>> ph.dudu.duduph <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
'
x0 0000000000000000 x1 0000000000007406 x2 0000000000000006 x3 0000000000000008
x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 7f7f7f7f7f7f7f7f
x8 0000000000000083 x9 d8cb342cbbd165b9 x10 0000000000000000 x11 fffffffc7ffffbdf
x12 0000000000000001 x13 ffffffffffffffff x14 ffffffffffffff00 x15 ffffffffffffffff
x16 0000007355bb12c0 x17 0000007355af033c x18 0000000000000001 x19 0000000000007406
x20 0000000000007406 x21 0000007fc6b27068 x22 00000072cfec2fe8 x23 0000000000000045
x24 00000072c791f598 x25 0000007fc6b27348 x26 0000000000000000 x27 0000000000000001
x28 0000000000000045 x29 0000007fc6b27050
sp 0000007fc6b27010 lr 0000007355ae4e68 pc 0000007355ae4e90
backtrace:
#00 pc 0000000000022e90 /system/lib64/libc.so (abort+116)
#01 pc 0000000001287244 /data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/lib/arm64/libflutter.so (offset 0x126e000)
#02 pc 00000000000020dc [anon:.bss:00000072ae9aa000]
我尝试搜索解决方案,但似乎还没有人遇到同样的问题。我也试过使缓存无效,flutter clean,然后重新安装应用程序,但问题仍然存在。
如果 android 添加此行 build.gradle
使用混合面板库版本 5.9.1
实施 'com.mixpanel.android:mixpanel-android:5.9.1'
这个问题毁了我的一天。现在mixpanel发布了新版本
https://github.com/mixpanel/mixpanel-android/releases/tag/v5.9.4
已在此版本中修复。
折腾了2天,Flutter终于可以用了。只需删除 mixpanel 依赖项并将其重新添加到 pubspec.yaml
中。您也可以尝试更新到最新版本(https://github.com/mixpanel/mixpanel-flutter/releases)
我最近在我的 flutter 移动应用程序中集成了 mixpanel。起初我们没有问题。但是在使用一段时间后,我无法再启动该应用程序,并显示以下错误:
E/flutter (29702): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_8ff85ea/Offline;
E/flutter (29702): at com.mixpanel.android.mpmetrics.MixpanelAPI.$jacocoInit(Unknown Source:13)
E/flutter (29702): at com.mixpanel.android.mpmetrics.MixpanelAPI.<clinit>(Unknown Source:0)
E/flutter (29702): at com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance(Unknown Source:0)
E/flutter (29702): at com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.handleInitialize(MixpanelFlutterPlugin.java:182)
E/flutter (29702): at com.mixpanel.mixpanel_flutter.MixpanelFlutterPlugin.onMethodCall(MixpanelFlutterPlugin.java:57)
E/flutter (29702): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/flutter (29702): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/flutter (29702): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/flutter (29702): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (29702): at android.os.MessageQueue.next(MessageQueue.java:386)
E/flutter (29702): at android.os.Looper.loop(Looper.java:175)
E/flutter (29702): at android.app.ActivityThread.main(ActivityThread.java:7625)
E/flutter (29702): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (29702): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
E/flutter (29702): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
E/flutter (29702): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jacoco.agent.rt.internal_8ff85ea.Offline" on path: DexPathList[[zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/android.test.runner.jar", zip file "/data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/base.apk"],nativeLibraryDirectories=[/data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/lib/arm64, /data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
E/flutter (29702): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
E/flutter (29702): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/flutter (29702): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/flutter (29702): ... 15 more
E/flutter (29702):
F/flutter (29702): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
F/libc (29702): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 29702 (ph.dudu.duduph), pid 29702 (ph.dudu.duduph)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'HUAWEI/INE-LX2/HWINE:9/HUAWEIINE-LX2/9.1.0.318C636:user/release-keys'
Revision: '0'
ABI: 'arm64'
Happend: 'Fri Oct 8 19:44:13 2021
'
SYSVMTYPE: Art
APPVMTYPE: Art
pid: 29702, tid: 29702, name: ph.dudu.duduph >>> ph.dudu.duduph <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).
'
x0 0000000000000000 x1 0000000000007406 x2 0000000000000006 x3 0000000000000008
x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 7f7f7f7f7f7f7f7f
x8 0000000000000083 x9 d8cb342cbbd165b9 x10 0000000000000000 x11 fffffffc7ffffbdf
x12 0000000000000001 x13 ffffffffffffffff x14 ffffffffffffff00 x15 ffffffffffffffff
x16 0000007355bb12c0 x17 0000007355af033c x18 0000000000000001 x19 0000000000007406
x20 0000000000007406 x21 0000007fc6b27068 x22 00000072cfec2fe8 x23 0000000000000045
x24 00000072c791f598 x25 0000007fc6b27348 x26 0000000000000000 x27 0000000000000001
x28 0000000000000045 x29 0000007fc6b27050
sp 0000007fc6b27010 lr 0000007355ae4e68 pc 0000007355ae4e90
backtrace:
#00 pc 0000000000022e90 /system/lib64/libc.so (abort+116)
#01 pc 0000000001287244 /data/app/ph.dudu.duduph-xxdPe23WLh6USaFzF3Frsw==/lib/arm64/libflutter.so (offset 0x126e000)
#02 pc 00000000000020dc [anon:.bss:00000072ae9aa000]
我尝试搜索解决方案,但似乎还没有人遇到同样的问题。我也试过使缓存无效,flutter clean,然后重新安装应用程序,但问题仍然存在。
如果 android 添加此行 build.gradle 使用混合面板库版本 5.9.1 实施 'com.mixpanel.android:mixpanel-android:5.9.1'
这个问题毁了我的一天。现在mixpanel发布了新版本
https://github.com/mixpanel/mixpanel-android/releases/tag/v5.9.4
已在此版本中修复。
折腾了2天,Flutter终于可以用了。只需删除 mixpanel 依赖项并将其重新添加到 pubspec.yaml
中。您也可以尝试更新到最新版本(https://github.com/mixpanel/mixpanel-flutter/releases)