I recently changed the package name of my Android application in the Eclipse IDE. Then, I imported it into 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. 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. Once I found the correct file (thanks to @ianhanniballake) I changed the application id and it worked.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.