Right click on com.mycompanyname1 package name and click option Refactor->Rename option (Alt+Shift+R) then rename packagename dialog box opens up, just change the package name as you want.So now package name gets divided in different sub-package like com, com.mycompanyname1, under java directory.Now again click on setting option and uncheck Hide Empty Middle Packages.Click setting icon from Project explorer and check the Flatten package option.Lets say, I want to change package name to.The purpose of sharing this feature separately is to highlight the steps, so it is easy for all Android developers to quickly change the PackageName when needed.īelow are the steps for changing the PackageName in Android studio. So in this article, I have tried to share some important guidelines to make this process easier. This is already documented in the Android Studio guide which is so huge that most of the time it is difficult to read everything of it. In Eclipse, the packages are displayed with full parent hierarchy, but in Android Studio, it is displayed in a folder level hierarchy, so sometimes it looks bit difficult to change the PackageName. But at times, while uploading an application on Play store or due to some other constraints there could be a need to change the PackageName of Android application or some packages in the application.Ĭhanging PackageName is a crucial part of any Android application as many of the core libraries and R.java file depends on the package name. Also, changing the package name was bit easy task for the Eclipse users, but this might not be the same in Android Studio as the package level names are not displayed in Eclipse style. i.e. While developing any Android application, generally it is the tendency of Android app developer to keep the PackageName as it is and not to change it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |