Android Studio错误文件错误ClassNotFoundException

aiazj4mn  于 2023-04-04  发布在  Android
关注(0)|答案(1)|浏览(107)
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.aromproject6, PID: 13385
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.aromproject6/com.example.aromproject6.StartActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.aromproject6.StartActivity" on path: DexPathList[[zip file "/data/app/~~gSEQsY1NRFD7fu96ddB6lA==/com.example.aromproject6--sMR1Ru1-lfEOAG_4i260A==/base.apk"],nativeLibraryDirectories=[/data/app/~~gSEQsY1NRFD7fu96ddB6lA==/com.example.aromproject6--sMR1Ru1-lfEOAG_4i260A==/lib/x86_64, /system/lib64, /system_ext/lib64]]
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3613)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
        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:2253)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7870)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.aromproject6.StartActivity" on path: DexPathList[[zip file "/data/app/~~gSEQsY1NRFD7fu96ddB6lA==/com.example.aromproject6--sMR1Ru1-lfEOAG_4i260A==/base.apk"],nativeLibraryDirectories=[/data/app/~~gSEQsY1NRFD7fu96ddB6lA==/com.example.aromproject6--sMR1Ru1-lfEOAG_4i260A==/lib/x86_64, /system/lib64, /system_ext/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
        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:1285)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3600)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
        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:2253) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loopOnce(Looper.java:201) 
        at android.os.Looper.loop(Looper.java:288) 
        at android.app.ActivityThread.main(ActivityThread.java:7870) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 

我有问题..帮助我...我不知道为什么我的笔记本电脑有错误。我不能运行任何代码。
我尝试了很多清洁项目。

w41d8nur

w41d8nur1#

这个错误表明
您尚未选择StartActivity来运行项目...
请转到AndroidManifest.xml文件并应用以下更改:

相关问题