android-studio - Android Studio 无需安装应用即可运行我的应用
问题描述
我正在尝试使用 Android studio 3.6.3 和我的手机制作一个应用程序来测试它。我遇到了一个问题,我认为卸载该应用程序是个好主意,但现在,Android Studio 无法识别该应用程序在我的手机上不存在,它会尝试运行该MainActivity.class
文件。错误是:
05/27 21:03:30:在小米红米 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} 不存在。
启动活动时出错
我怎样才能欺骗它以正确重新安装应用程序?
解决方案
我在右侧解决了它 Grandle>MyApp>Tasks>install>UninstallRelease ,然后再次运行应用程序以便它正确构建。
推荐阅读
- jira - 使用逻辑应用从 SharePoint 创建 JIRA 问题
- python - 如何在 python 中使用对象作为 vaue 进行多处理
- django - 'Post' 对象没有属性 'get_absolute_url' Django
- python - 在 Pandas 中打开和读取 zip 文件夹中的 txt 文件时出现问题
- arrays - 在c中将字符串转换为二维数组
- composer-php - 如何在 Windows 10 中更改作曲家版本
- react-native - 如何在 react-native 中保存和加载 tflite 版本的posenet?
- javascript - NestJS 事件发射器
- paddle-paddle - PaddleOCR 性能与 Tesseract 相比如何?
- python - 警告:张量流:模型是用形状构造的