简体   繁体   English

我经常发现此特定错误:“无法识别启动活动:找不到默认活动启动活动时出错”

[英]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.

相关问题 无法识别启动活动:找不到默认活动启动活动时出错 - Could not identify launch activity: Default Activity not found Error while Launching activity 无法识别启动活动,未找到默认活动启动活动时出错 - Could not identify launch activity , Default Activity not found Error while Launching activity 运行项目时出现错误(无法识别启动活动:未找到默认活动) - Getting Error(Could not identify launch activity: Default Activity not found) While running project 无法识别启动活动:未找到默认活动 - Could not identify launch Activity: Default Activity not found 无法识别启动活动:未找到默认活动 - Could not identify launch Activity: Default Activity wasn't found 自定义键盘-无法识别启动活动:找不到默认活动 - Custom Keyboard - Could not identify launch activity: Default Activity not found Android Automotive:无法识别启动活动:未找到默认活动 - Android Automotive: Could not identify launch activity: Default Activity not found 无法识别启动活动:启动活动时无法列出 apks 错误 - Could not identify launch activity: Unable to list apks Error while Launching activity 无法识别启动活动:升级到 Android Studio 4.0 后未找到默认活动 - Could not identify launch activity: Default Activity not found after upgrading to Android Studio 4.0 在构建Kotlin项目时,Android Studio报告“无法识别启动活动:找不到默认活动” - Android Studio reports “Could not identify launch activity: Default Activity not found” when building Kotlin projects
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM