dart-native / dart_native

Write iOS&macOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.
BSD 3-Clause "New" or "Revised" License
951 stars 77 forks source link

i cant run examle. please help 0.0 #109

Closed lwy980328 closed 1 year ago

lwy980328 commented 2 years ago

Describe the bug i clone this project and just run it.

Expected behavior √ Built build\app\outputs\flutter-apk\app-debug.apk. Installing build\app\outputs\flutter-apk\app.apk... E/AndroidRuntime(23586): FATAL EXCEPTION: main E/AndroidRuntime(23586): Process: com.dartnative.dart_native_example, PID: 23586 E/AndroidRuntime(23586): java.lang.RuntimeException: Unable to instantiate application com.dartnative.dart_native_example.Application: java.lang.ClassNotFoundException: Didn't find class "com.dartnative.dart_native_example.Application" on path: DexPathList[[zip file "/data/app/com.dartnative.dart_native_example-qBtK-PiOChwbKmJqkiZg9A==/base.apk"],nativeLibraryDirectories=[/data/app/com.dartnative.dart_native_example-qBtK-PiOChwbKmJqkiZg9A==/lib/arm64, /data/app/com.dartnative.dart_native_example-qBtK-PiOChwbKmJqkiZg9A==/base.apk!/lib/arm64-v8a, /system/lib64]] E/AndroidRuntime(23586): at android.app.LoadedApk.makeApplication(LoadedApk.java:1070) E/AndroidRuntime(23586): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6199) E/AndroidRuntime(23586): at android.app.ActivityThread.access$1500(ActivityThread.java:218) E/AndroidRuntime(23586): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1803) E/AndroidRuntime(23586): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(23586): at android.os.Looper.loop(Looper.java:223) E/AndroidRuntime(23586): at android.app.ActivityThread.main(ActivityThread.java:7035) E/AndroidRuntime(23586): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(23586): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) E/AndroidRuntime(23586): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:937) E/AndroidRuntime(23586): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.dartnative.dart_native_example.Application" on path: DexPathList[[zip file "/data/app/com.dartnative.dart_native_example-qBtK-PiOChwbKmJqkiZg9A==/base.apk"],nativeLibraryDirectories=[/data/app/com.dartnative.dart_native_example-qBtK-PiOChwbKmJqkiZg9A==/lib/arm64, /data/app/com.dartnative.dart_native_example-qBtK-PiOChwbKmJqkiZg9A==/base.apk!/lib/arm64-v8a, /system/lib64]] E/AndroidRuntime(23586): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) E/AndroidRuntime(23586): at java.lang.ClassLoader.loadClass(ClassLoader.java:379) E/AndroidRuntime(23586): at java.lang.ClassLoader.loadClass(ClassLoader.java:312) E/AndroidRuntime(23586): at android.app.AppComponentFactory.instantiateApplication(AppComponentFactory.java:50) E/AndroidRuntime(23586): at androidx.core.app.CoreComponentFactory.instantiateApplication(CoreComponentFactory.java:47) E/AndroidRuntime(23586): at android.app.Instrumentation.newApplication(Instrumentation.java:1122) E/AndroidRuntime(23586): at android.app.LoadedApk.makeApplication(LoadedApk.java:1062) E/AndroidRuntime(23586): ... 9 more

Desktop (please complete the following information): win flutter 2.2.3

Smartphone (please complete the following information): meizu 16s android 9

Additional context Add any other context about the problem here.

lwy980328 commented 2 years ago

....i solved it in dart_native/example/android/app/src/main/AndroidManifest.xml

delete android:name="${applicationName}"