I am using Android Studio version 2.1.2, and I am trying to implement Google Cloud Messaging to my app.
To be able to do that I hav
With introduction with Android Studio seen has been changed. Earlier in eclipse Manifest.xml package name considered whole and sole as you upload your app on Google Play store it will pick the package name from Manifest.xml but it is not the case with Android Studio.
In Android Studio there are two place where application package name goes.
build.gradle example
defaultConfig {
applicationId "com.company.testapp"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
Notice the applicationId above which is other place where package name goes.
@Mdlc is absolutely right.
Which one should I edit to change my final package name? The package name in Gradle will overwrite the package name in the Manifest. So you should change it in Gradle.
If you would like to actually change the structure of your project, then you'd need to change your packagename in Manifest.xml
When we refactor rename application package name in Android Studio it does not change application Id. We have to do it manually. Please pay attention to this because it very important. As when we upload our application on Google Play store google pick package name matching with applicationId as in case of above example com.company.testapp.