简体   繁体   English

Android Studio软件包名称不正确

[英]Android Studio incorrect package name

I recently changed the package name of my Android application in the Eclipse IDE. 我最近在Eclipse IDE中更改了Android应用程序的程序包名称。 Then, I imported it into Android Studio. 然后,将其导入Android Studio。 However, I noticed when running the app that it said 但是,我在运行应用程序时注意到它说

Target device: AVD_for_10_1_WXGA_Tablet [emulator-5556]
Uploading file
    local path: C:\Users\User\StudioProjects\AppName\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.oldpackage.appname
Installing com.oldpackage.appname
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.oldpackage.appname"
pkg: /data/local/tmp/com.oldpackage.appname
Success.

It is still using the old package name! 它仍然使用旧的程序包名称!

I have tried many fixes I found on StackOverflow, including restarting, deleting /.gradle/taskartifacts (cache), and syncing project with gradle files. 我已经尝试了许多在StackOverflow上发现的修复程序,包括重新启动,删除/.gradle/taskartifacts (缓存)以及与gradle文件同步项目。 Does anyone know how to get my package name completely updated? 有人知道如何完全更新我的包裹名称吗?

My problem was that I was looking at the wrong build.gradle file and didn't see the application id value. 我的问题是我查看的是错误的build.gradle文件,但没有看到应用程序ID值。 Once I found the correct file (thanks to @ianhanniballake) I changed the application id and it worked. 找到正确的文件后(感谢@ianhanniballake),我更改了应用程序ID并成功运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM