下午安装错误的包名 [英] pm installing wrong package name

查看:133
本文介绍了下午安装错误的包名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近做了一个新的应用程序,只需最少的存根MainActivity。当我运行使用Android Studio和应用项目的Gradle应用程序失败,出现以下消息:

I recently made a new app with just a minimal stub MainActivity. When I run the app using Android Studio and gradle project the app fails with the following message:

Uploading file
    local path: C:\Users\fnajmi\myapp-android\app\build\apk\app-debug-unaligned.apk
    remote path: /data/local/tmp/com.myapp.app
Installing com.myapp.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.myapp.app"
pkg: /data/local/tmp/com.myapp.app
Success


Launching application: com.myapp/com.myapp.app.HomeActivity.
DEVICE SHELL COMMAND: am start -n "com.myapp.app/com.myapp.app.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.myapp.app/com.myapp.app.MainActivity }
Error type 3
Error: Activity class {com.myapp.app/commyapp.app.MainActivity} does not exist.

我已经检查了我的整个项目文件夹树,但我找不到这个词的myapp的任何地方。这是我在过去使用,但后来改变了包名。那么,是这个未来的我不知道?

I have checked my entire project folder tree but I cannot find the word "myapp" anywhere. This was a package name I had used in the past but changed later. So where is this coming from I wonder?

推荐答案

这个问题被认为是在〜/ .gradle /缓存树的一些文件。删除此树和重建解决了这一问题。

The problem was found to be in some file in the ~/.gradle/cache tree. Removing this tree and rebuilding fixed the problem.

这篇关于下午安装错误的包名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆