I have an android project with a package name like com.example.alexander.app
and I want to change this to a name containing only three parts, like com.alexapps.firstapp
. However, after searching several sites, I still have no idea how to do that in AndroidStudio (2.1.3).
I found the following answer, which do not fully answer my question:
R.java
which I cannot findSo is there a way to remove a part of a package name with AndroidStudio?
Step by Step Implementation Step 2: Now click on the setting gear icon and deselect Compact Middle Packages. Step 3: Now the packages folder is broken into parts as shown in the below image. Step 4: Now right-click on the first package name (com) and Refactor > Rename.
From Dianne Hackborn: Things That Cannot Change: The most obvious and visible of these is the “manifest package name,” the unique name you give to your application in its AndroidManifest.
No it wont have any change. You follow the same steps as before but with your new package. Just upload it as a new app. That's all.
The easiest thing to do is right click the folder/package, and refactor. This however i think is limited to the final folder, and does not remove a hierarchy.
So the solution in this scenario, is to
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With