我试图在androidstudio中构建项目后打开应用程序。看看这个致命的错误!我正在使用andridstudio4gradle6.1.1并在pixel3a\uapi\u30x86上启动app。请帮助我解决以下问题我的构建工具版本是:28.0.3分钟版本是:16编译器版本和目标版本是:28
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.Sz_kudak, PID: 10679
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.Sz_kudak/com.Sz_kudak.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.Sz_kudak.MainActivity" on path: DexPathList[[zip file "/data/app/~~UEHehGZ-MmZxWNQoPPwEFQ==/com.Sz_kudak-TcCaMriiPjl5FkhdO0g3MA==/base.apk"],nativeLibraryDirectories=[/data/app/~~UEHehGZ-MmZxWNQoPPwEFQ==/com.Sz_kudak-TcCaMriiPjl5FkhdO0g3MA==/lib/x86, /data/app/~~UEHehGZ-MmZxWNQoPPwEFQ==/com.Sz_kudak-TcCaMriiPjl5FkhdO0g3MA==/base.apk!/lib/x86, /system/lib, /system_ext/lib, /product/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3365)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.Sz_kudak.MainActivity" on path: DexPathList[[zip file "/data/app/~~UEHehGZ-MmZxWNQoPPwEFQ==/com.Sz_kudak-TcCaMriiPjl5FkhdO0g3MA==/base.apk"],nativeLibraryDirectories=[/data/app/~~UEHehGZ-MmZxWNQoPPwEFQ==/com.Sz_kudak-TcCaMriiPjl5FkhdO0g3MA==/lib/x86, /data/app/~~UEHehGZ-MmZxWNQoPPwEFQ==/com.Sz_kudak-TcCaMriiPjl5FkhdO0g3MA==/base.apk!/lib/x86, /system/lib, /system_ext/lib, /product/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3353)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
我的android androidmanifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Sz_kudak">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:hardwareAccelerated="false"
android:launchMode="singleTask">
<activity
android:name="com.Sz_kudak.MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
</application>
</manifest>
暂无答案!
目前还没有任何答案,快来回答吧!