The consolidation of the middle names in the package must be strengthened, so that the parameters for displaying the structure of the project that is above the texture itself and removing the box should be selected. "Compact Empty Middle Packages.": When names are removed, each name can be changed separately. Change the necessary names from the context menu. Refactor - state Rename or Shift+F6♪ When the warning comes, we're pressed. Rename Package♪ When the first name of the package is changed, com/ru/ua must be pressed.Rename all" , since the deposits of libraries are located inside the folder, which also need to be replaced.Now the package's name's changed, the communications in the classroom are rewritten, but the project designs don't know we've done anything. For warning, open build.gradle (Module:app)We find the following section of the code:defaultConfig {
applicationId "com.name.test" // изменить на новое нужное
minSdkVersion ...
targetSdkVersion ...
versionCode ...
versionName "..."
}
and change the name of the package to new. Most cases Gradle It will itself determine that changes have been made and propose to synchronize with the project by presenting the relevant notice in the right upper corner. But if that doesn't happen, it's necessary to perform manual synchronization. We're going to the menu. Tools –> Android –> Sync Project With Gradle Files♪The last thing we have to do is change the name of the package in the manifest, although the names will be changed. Open the manifest. AndroidManifest.xml And at the top we change the name:<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.name.test"> // изменить на новое нужное
If after all steps Android Studio Can't initiate. R.javaand will be notified Cannot resolve symbol Rthe project should be cleaned up by moving to the appropriate menu Build -> Clean Project♪ http://awesomedevelop.blogspot.ru/2015/01/how-to-change-packagename.html If it's boring to read, look. https://plus.google.com/+vitaxafication/posts/ebAb4oF4nWF