FATAL EXCEPTION: main, having an error while starting app / Flutter

Viewed 2144

I am having some error while starting my android app down below. I think it has to do with AndroidManifest.xml Thank you for help in advance!

Debug console output:

√ Built build\app\outputs\flutter-apk\app-debug.apk.
E/AndroidRuntime(12850): FATAL EXCEPTION: main
E/AndroidRuntime(12850): Process: com.example.finalproject, PID: 12850
E/AndroidRuntime(12850): java.lang.RuntimeException: Unable to instantiate application io.flutter.app.FlutterApplication: java.lang.ClassNotFoundException: Didn't find class "io.flutter.app.FlutterApplication" on path: DexPathList[[zip file "/data/app/com.example.finalproject-TKk2pSYMBdlivmhMJqry9A==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.finalproject-TKk2pSYMBdlivmhMJqry9A==/lib/arm64, /data/app/com.example.finalproject-TKk2pSYMBdlivmhMJqry9A==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
E/AndroidRuntime(12850):    at android.app.LoadedApk.makeApplication(LoadedApk.java:1230)
E/AndroidRuntime(12850):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6575)
E/AndroidRuntime(12850):    at android.app.ActivityThread.access$1400(ActivityThread.java:227)
E/AndroidRuntime(12850):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1890)
E/AndroidRuntime(12850):    at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(12850):    at android.os.Looper.loop(Looper.java:224)
E/AndroidRuntime(12850):    at android.app.ActivityThread.main(ActivityThread.java:7590)
E/AndroidRuntime(12850):    at java.lang.reflect.Method.invoke(Native Method)

Didn't find class "io.flutter.app.FlutterApplication" on path: DexPathList[[zip file "/data/app/com.example.finalproject-TKk2pSYMBdlivmhMJqry9A==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.finalproject-TKk2pSYMBdlivmhMJqry9A==/lib/arm64, /data/app/com.example.finalproject-TKk2pSYMBdlivmhMJqry9A==/base.apk!/lib/arm64-v8a, /system/lib64, /system/product/lib64]]
1 Answers

There seems to be an issue in the references that the Flutter project uses. You can run either flutter clean or flutter pub cache repair to help rebuild the references used in the project, then run flutter pub get to download the configured plugins.

Related