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:
- Answer 1 requires the file
R.java
which I cannot find - Answer 2 looked very good by using methods in AndroidStudio. Unfortunately, even after cleaning and rebuilding the project, the package name was not changed on my single activity.
- Answer 3: I searched for the string, and found more than 1000 hints!! Therefore I have not continued with this solution to replace more than 1000 hits, as this does not sound right. I have only 1 (one!) single activity in this test app...
- Answer 4: Very good answer, but only useful if you want to change each of the package name parts (and neither increasing nor decreasing the number of parts in the package name).
So is there a way to remove a part of a package name with AndroidStudio?