[英]I often found this specific error: “Could not identify launch activity: Default Activity not found Error while Launching activity”
This is my adb shell commands to install application, each time when i install app, it show default activity not found. 这是我安装应用程序的adb shell命令,每次我安装应用程序时,都会显示未找到默认活动。
$ adb shell pm install -t -r "/data/local/tmp/it.dabbl"
Success
APK installed in 9 s 725 ms
Could not identify launch activity: Default Activity not found
Error while Launching activity
you have to define your launcher activity in manifest. 您必须在清单中定义启动器活动。
<activity
android:name=".MainActivity" //Whatever Activity you want to launch first>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
So after searching on internet over an hour, i have check from project structure that i have not set the default config settings. 因此,在互联网上搜索一个小时后,我从项目结构中检查了我是否未设置默认配置设置。 To resolve this issue you have to open project structure and then add default config and then synced with gradle will solve this issue.
要解决此问题,您必须打开项目结构,然后添加默认配置,然后与gradle同步将解决此问题。
I had this same problem and solved it by manually setting the launch activity. 我遇到了同样的问题,并通过手动设置启动活动来解决。 From the menu select "Run -> Edit Configurations...", and then under "Launch Options" select "Launch: Specified Activity" and "Activity: your.launch.activity" where "your.launch.activity" is the activity you want to launch.
从菜单中选择“运行->编辑配置...”,然后在“启动选项”下选择“启动:指定活动”和“活动:your.launch.activity”,其中“ your.launch.activity”是活动您要启动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.