我正在尝试运行一个项目,但发现了一个错误:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.aol.Application" on path: DexPathList[[zip file "/data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/lib/arm64, /data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
有人对下面的错误有什么想法吗:
这是相关的清单
:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.aol" xmlns:tools="http://schemas.android.com/tools">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<application
android:name=".Application"
tools:replace="android:label"
android:label="aol"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- This keeps the window background of the activity showing
until Flutter renders its first frame. It can be removed if
there is no splash screen (such as the default splash screen
defined in @style/LaunchTheme). -->
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="${applicationId}.braintree" />
</intent-filter>
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id"/>
<!-- TODO: Replace with your real AdMob app ID -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value= "@string/android__admob_ads_id_key" />
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
</manifest>
这是完整的错误信息:
Launching lib\main.dart on Redmi 5 in debug mode...
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk... 38.0s
E/AndroidRuntime(14356): FATAL EXCEPTION: main
E/AndroidRuntime(14356): Process: com.example.aol, PID: 14356
E/AndroidRuntime(14356): java.lang.RuntimeException: Unable to instantiate application com.example.aol.Application: java.lang.ClassNotFoundException: Didn't find class "com.example.aol.Application" on path: DexPathList[[zip file "/data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/lib/arm64, /data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
E/AndroidRuntime(14356): at android.app.LoadedApk.makeApplication(LoadedApk.java:993)
E/AndroidRuntime(14356): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5801)
E/AndroidRuntime(14356): at android.app.ActivityThread.-wrap1(Unknown Source:0)
E/AndroidRuntime(14356): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1685)
E/AndroidRuntime(14356): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(14356): at android.os.Looper.loop(Looper.java:176)
/AndroidRuntime(14356): at android.app.ActivityThread.main(ActivityThread.java:6651)
E/AndroidRuntime(14356): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(14356): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/AndroidRuntime(14356): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)
E/AndroidRuntime(14356): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.aol.Application" on path: DexPathList[[zip file "/data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/lib/arm64, /data/app/com.example.aol-1JWhf7hk26dkh1US0WG4tg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
E/AndroidRuntime(14356): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
E/AndroidRuntime(14356): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(14356): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(14356): at android.app.Instrumentation.newApplication(Instrumentation.java:1088)
E/AndroidRuntime(14356): at android.app.LoadedApk.makeApplication(LoadedApk.java:987)
E/AndroidRuntime(14356): ... 9 more