Flutter开发HarmonyOS鸿蒙Next应用的时候遇到java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackI...如何解决
Flutter开发HarmonyOS鸿蒙Next应用的时候遇到java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackI…如何解决
Android项目运行报错,在启动页无法正常启动
minSdkVersion 21
targetSdkVersion 33
compileSdkVersion 33
zygote64
jecting re-init on previously-failed class java.lang.Class<io.flutter.embedding.android.FlutterActivity$1>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
zygote64
at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
zygote64
at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1179)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2930)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
used by: java.lang.ClassNotFoundException: Didn’t find class “android.window.OnBackInvokedCallback” on path: DexPathList[[zip file “/system/framework/org.simalliance.openmobileapi.jar”, zip file “/data/app/
6vA-TpzslYwybwbazQ==/base.apk”],nativeLibraryDirectories=[/data/app/
6vA-TpzslYwybwbazQ==/lib/arm64, /data/app/
6vA-TpzslYwybwbazQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
zygote64
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
zygote64
at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
zygote64
at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1179)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2930)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
024-08-05 18:30:39.740 7122-7122 zygote64
jecting re-init on previously-failed class java.lang.Class<io.flutter.embedding.android.FlutterActivity$1>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
zygote64
at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
zygote64
at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1179)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2930)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
used by: java.lang.ClassNotFoundException: Didn’t find class “android.window.OnBackInvokedCallback” on path: DexPathList[[zip file “/system/framework/org.simalliance.openmobileapi.jar”, zip file “/data/app/
6vA-TpzslYwybwbazQ==/base.apk”],nativeLibraryDirectories=[/data/app/
6vA-TpzslYwybwbazQ==/lib/arm64, /data/app/
6vA-TpzslYwybwbazQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
zygote64
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
zygote64
at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
zygote64
at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1179)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2930)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
024-08-05 18:30:39.740 7122-7122 zygote64
jecting re-init on previously-failed class java.lang.Class<io.flutter.embedding.android.FlutterActivity$1>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackInvokedCallback;
zygote64
at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
zygote64
at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1179)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2930)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
used by: java.lang.ClassNotFoundException: Didn’t find class “android.window.OnBackInvokedCallback” on path: DexPathList[[zip file “/system/framework/org.simalliance.openmobileapi.jar”, zip file “/data/app/
6vA-TpzslYwybwbazQ==/base.apk”],nativeLibraryDirectories=[/data/app/
6vA-TpzslYwybwbazQ==/lib/arm64, /data/app/
6vA-TpzslYwybwbazQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
zygote64
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
zygote64
at java.lang.Object java.lang.Class.newInstance() (Class.java:-2)
zygote64
at android.app.Activity android.app.Instrumentation.newActivity(java.lang.ClassLoader, java.lang.String, android.content.Intent) (Instrumentation.java:1179)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2930)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
024-08-05 18:30:39.753 7122-7122 FtBuild
tRomVersion mRomVer=9.0
zygote64
jecting re-init on previously-failed class java.lang.Class<io.flutter.embedding.engine.-$$Lambda$FlutterJNI$2fUF03zsar2dpLbGJv6IUmJU-0A>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/graphics/ImageDecoder$OnHeaderDecodedListener;
zygote64
at io.flutter.embedding.engine.FlutterJNI io.flutter.embedding.engine.FlutterJNI$Factory.provideFlutterJNI() (FlutterJNI.java:123)
zygote64
at void io.flutter.FlutterInjector$Builder.fillDefaults() (FlutterInjector.java:169)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector$Builder.build() (FlutterInjector.java:179)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector.instance() (FlutterInjector.java:57)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, io.flutter.embedding.engine.loader.FlutterLoader, io.flutter.embedding.engine.FlutterJNI, io.flutter.plugin.platform.PlatformViewsController, java.lang.String[], boolean, boolean) (FlutterEngine.java:289)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, java.lang.String[], boolean, boolean) (FlutterEngine.java:207)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine() (FlutterActivityAndFragmentDelegate.java:272)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:181)
zygote64
at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:495)
zygote64
at void
Activity.onCreate(android.os.Bundle) (MainActivity.kt:34)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7140)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7131)
zygote64
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3001)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
used by: java.lang.ClassNotFoundException: Didn’t find class “android.graphics.ImageDecoder$OnHeaderDecodedListener” on path: DexPathList[[zip file “/system/framework/org.simalliance.openmobileapi.jar”, zip file “/data/app/
6vA-TpzslYwybwbazQ==/base.apk”],nativeLibraryDirectories=[/data/app/
6vA-TpzslYwybwbazQ==/lib/arm64, /data/app/
6vA-TpzslYwybwbazQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
zygote64
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
zygote64
at io.flutter.embedding.engine.FlutterJNI io.flutter.embedding.engine.FlutterJNI$Factory.provideFlutterJNI() (FlutterJNI.java:123)
zygote64
at void io.flutter.FlutterInjector$Builder.fillDefaults() (FlutterInjector.java:169)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector$Builder.build() (FlutterInjector.java:179)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector.instance() (FlutterInjector.java:57)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, io.flutter.embedding.engine.loader.FlutterLoader, io.flutter.embedding.engine.FlutterJNI, io.flutter.plugin.platform.PlatformViewsController, java.lang.String[], boolean, boolean) (FlutterEngine.java:289)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, java.lang.String[], boolean, boolean) (FlutterEngine.java:207)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine() (FlutterActivityAndFragmentDelegate.java:272)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:181)
zygote64
at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:495)
zygote64
at void
Activity.onCreate(android.os.Bundle) (MainActivity.kt:34)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7140)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7131)
zygote64
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3001)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
024-08-05 18:30:39.774 7122-7122 zygote64
jecting re-init on previously-failed class java.lang.Class<io.flutter.embedding.engine.-$$Lambda$FlutterJNI$2fUF03zsar2dpLbGJv6IUmJU-0A>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/graphics/ImageDecoder$OnHeaderDecodedListener;
zygote64
at io.flutter.embedding.engine.FlutterJNI io.flutter.embedding.engine.FlutterJNI$Factory.provideFlutterJNI() (FlutterJNI.java:123)
zygote64
at void io.flutter.FlutterInjector$Builder.fillDefaults() (FlutterInjector.java:169)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector$Builder.build() (FlutterInjector.java:179)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector.instance() (FlutterInjector.java:57)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, io.flutter.embedding.engine.loader.FlutterLoader, io.flutter.embedding.engine.FlutterJNI, io.flutter.plugin.platform.PlatformViewsController, java.lang.String[], boolean, boolean) (FlutterEngine.java:289)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, java.lang.String[], boolean, boolean) (FlutterEngine.java:207)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine() (FlutterActivityAndFragmentDelegate.java:272)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:181)
zygote64
at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:495)
zygote64
at void
Activity.onCreate(android.os.Bundle) (MainActivity.kt:34)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7140)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7131)
zygote64
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3001)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
used by: java.lang.ClassNotFoundException: Didn’t find class “android.graphics.ImageDecoder$OnHeaderDecodedListener” on path: DexPathList[[zip file “/system/framework/org.simalliance.openmobileapi.jar”, zip file “/data/app/
6vA-TpzslYwybwbazQ==/base.apk”],nativeLibraryDirectories=[/data/app/
6vA-TpzslYwybwbazQ==/lib/arm64, /data/app/
6vA-TpzslYwybwbazQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
zygote64
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
zygote64
at io.flutter.embedding.engine.FlutterJNI io.flutter.embedding.engine.FlutterJNI$Factory.provideFlutterJNI() (FlutterJNI.java:123)
zygote64
at void io.flutter.FlutterInjector$Builder.fillDefaults() (FlutterInjector.java:169)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector$Builder.build() (FlutterInjector.java:179)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector.instance() (FlutterInjector.java:57)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, io.flutter.embedding.engine.loader.FlutterLoader, io.flutter.embedding.engine.FlutterJNI, io.flutter.plugin.platform.PlatformViewsController, java.lang.String[], boolean, boolean) (FlutterEngine.java:289)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, java.lang.String[], boolean, boolean) (FlutterEngine.java:207)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine() (FlutterActivityAndFragmentDelegate.java:272)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:181)
zygote64
at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:495)
zygote64
at void
Activity.onCreate(android.os.Bundle) (MainActivity.kt:34)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7140)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7131)
zygote64
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3001)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
024-08-05 18:30:39.775 7122-7122 zygote64
jecting re-init on previously-failed class java.lang.Class<io.flutter.embedding.engine.-$$Lambda$FlutterJNI$2fUF03zsar2dpLbGJv6IUmJU-0A>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/graphics/ImageDecoder$OnHeaderDecodedListener;
zygote64
at io.flutter.embedding.engine.FlutterJNI io.flutter.embedding.engine.FlutterJNI$Factory.provideFlutterJNI() (FlutterJNI.java:123)
zygote64
at void io.flutter.FlutterInjector$Builder.fillDefaults() (FlutterInjector.java:169)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector$Builder.build() (FlutterInjector.java:179)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector.instance() (FlutterInjector.java:57)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, io.flutter.embedding.engine.loader.FlutterLoader, io.flutter.embedding.engine.FlutterJNI, io.flutter.plugin.platform.PlatformViewsController, java.lang.String[], boolean, boolean) (FlutterEngine.java:289)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, java.lang.String[], boolean, boolean) (FlutterEngine.java:207)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine() (FlutterActivityAndFragmentDelegate.java:272)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:181)
zygote64
at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:495)
zygote64
at void
Activity.onCreate(android.os.Bundle) (MainActivity.kt:34)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7140)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7131)
zygote64
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3001)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
zygote64
used by: java.lang.ClassNotFoundException: Didn’t find class “android.graphics.ImageDecoder$OnHeaderDecodedListener” on path: DexPathList[[zip file “/system/framework/org.simalliance.openmobileapi.jar”, zip file “/data/app/
6vA-TpzslYwybwbazQ==/base.apk”],nativeLibraryDirectories=[/data/app/
6vA-TpzslYwybwbazQ==/lib/arm64, /data/app/
6vA-TpzslYwybwbazQ==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
zygote64
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
zygote64
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
zygote64
at io.flutter.embedding.engine.FlutterJNI io.flutter.embedding.engine.FlutterJNI$Factory.provideFlutterJNI() (FlutterJNI.java:123)
zygote64
at void io.flutter.FlutterInjector$Builder.fillDefaults() (FlutterInjector.java:169)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector$Builder.build() (FlutterInjector.java:179)
zygote64
at io.flutter.FlutterInjector io.flutter.FlutterInjector.instance() (FlutterInjector.java:57)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, io.flutter.embedding.engine.loader.FlutterLoader, io.flutter.embedding.engine.FlutterJNI, io.flutter.plugin.platform.PlatformViewsController, java.lang.String[], boolean, boolean) (FlutterEngine.java:289)
zygote64
at void io.flutter.embedding.engine.FlutterEngine.<init>(android.content.Context, java.lang.String[], boolean, boolean) (FlutterEngine.java:207)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.setupFlutterEngine() (FlutterActivityAndFragmentDelegate.java:272)
zygote64
at void io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(android.content.Context) (FlutterActivityAndFragmentDelegate.java:181)
zygote64
at void io.flutter.embedding.android.FlutterActivity.onCreate(android.os.Bundle) (FlutterActivity.java:495)
zygote64
at void
Activity.onCreate(android.os.Bundle) (MainActivity.kt:34)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7140)
zygote64
at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7131)
zygote64
at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1219)
zygote64
at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:3001)
zygote64
at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3126)
zygote64
at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
zygote64
at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1820)
zygote64
at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
zygote64
at void android.os.Looper.loop() (Looper.java:192)
zygote64
at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6893)
zygote64
at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
zygote64
at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:549)
zygote64
at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:875)
在Flutter开发HarmonyOS鸿蒙Next应用时遇到java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/OnBackI...
这类错误,通常是因为项目中缺少了必要的类定义或者库依赖。
这个问题可能是由于以下几个原因导致的:
-
依赖库未正确引入:检查你的
build.gradle
文件,确保所有必需的依赖都已正确添加。特别是与Android窗口管理相关的库。 -
类名拼写错误:错误中的
Landroid/window/OnBackI...
似乎是不完整的类名,可能是在编译过程中由于某种原因被截断了。检查代码中是否有类似的拼写错误或引用错误。 -
兼容性问题:如果你正在尝试将Android特有的类(如
OnBackPressedCallback
)用于HarmonyOS开发,可能会遇到兼容性问题。HarmonyOS API与Android API并不完全相同,确保你使用的是HarmonyOS兼容的API。 -
清理和重建项目:有时候,简单的清理和重建项目可以解决一些看似复杂的编译错误。
如果上述方法都不能解决问题,可能是更复杂的配置或环境问题。这时,你可以尝试联系官网客服获取更专业的帮助。官网地址是:https://www.itying.com/category-93-b0.html