【问题标题】:Android studio runs my application without installing the appAndroid Studio 无需安装应用即可运行我的应用
【发布时间】:2020-09-14 21:49:43
【问题描述】:

我正在尝试使用 Android Studio 3.6.3 和我的手机制作一个应用程序来测试它。我遇到了一个问题,我认为卸载该应用程序是个好主意,但现在,Android Studio 无法识别该应用程序在我的手机上不存在,它会尝试运行 MainActivity.class 文件。 错误是:

05/27 21:03:30:在 Xiaomi Redmi Note 7 上启动“MainActivity”。

$ adb shell am start -n "com.example.liteshop20/com.example.liteshop20.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER 执行时出错:am start -n "com.example.liteshop20/com.example.liteshop20.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER 开始: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.liteshop20/.MainActivity } 错误类型 3 错误:活动类 {com.example.liteshop20/com.example.liteshop20.MainActivity} 不存在。

启动活动时出错

如何欺骗它以正确重新安装应用程序?

【问题讨论】:

  • 你试过this page上的解决方案吗?
  • 是的,我已经这样做了。

标签: android-studio


【解决方案1】:

我在右侧解决了它 Grandle>MyApp>Tasks>install>UninstallRelease 然后再次运行应用程序,使其正确构建。

【讨论】:

    猜你喜欢
    • 2013-06-01
    • 2018-01-14
    • 1970-01-01
    • 2011-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多