我是新的android开发,我真的觉得它有时混乱和混乱。我正在运行我的项目,这之前工作正常,然后复制一个活动,并改变了工作正常的包名称。我关闭了android studio。现在,当我再次打开我的项目时,我开始收到错误“Error launching :: No default Activity found”,但我在AndroidManifest.xml中找到了它。然后,我尝试了“编辑配置 - >常规 - >启动应用程序,并将其设置为Splashscreen。现在我得到了这个新的错误,它太固执,不会消失!我已经尝试了一切,但没有真正为我工作,请帮助我可能会丢失一些愚蠢Android Studio错误类型3:错误,同时启动活动
$ adb shell am start -n"com.example.dell.optasiaapp/com.example.dell.optasiaapp.Splashscreen" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.example.dell.optasiaapp/com.example.dell.optasiaapp.Splashscreen" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat= [android.intent.category.LAUNCHER] cmp=com.example.dell.optasiaapp/.Splashscreen }
Error type 3
Error: Activity class {com.example.dell.optasiaapp/com.example.dell.optasiaapp.Splashscreen} does not exist.
Error while Launching activity
我曾尝试:
- 清洁工程和重建
- 卸载应用程序,断开移动和重新连接重新建立
- Deleting.idea /工作区.xml
- 添加应用程序ID = “PAKAGE名” 的gradle中建
- 改变机器人:名字=至Android “闪屏”:NAME = “com.example.dell.optasiaapp.Splashscreen”
- 文件 - >缓存无效/重新启动...
我AndroidManifest代码
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"></application>
<activity android:name=".Splashscreen"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HomeScreen">
<intent-filter>
<action android:name="com.example.dell.optasiaapp.HomeScreen" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity android:name=".AboutUs">
<intent-filter>
<action android:name="com.example.dell.optasiaapp.AboutUs" />
<category android:name="android.intent.category.About" />
</intent-filter>
</activity>
<activity android:name=".Help" > </activity>
它已经'com.android.application' –