-2

What is the mean of applicationId in build.gradle. and what is the difference between package name in manifest file and applicationId in build.gradle.

aj0822ArpitJoshi
  • 1,142
  • 1
  • 9
  • 25

2 Answers2

3

What is the mean of applicationId in build.gradle

Every Android app has a unique application ID that looks like a Java package name, such as com.nilu.myapp. This ID uniquely identifies your app on the device and in Google Play Store. If you want to upload a new version of your app, the application ID (and the certificate you sign it with) must be the same as the original APK—if you change the application ID, Google Play Store treats the APK as a completely different app. So once you publish your app, you should never change the application ID.

Read more about applicationId

what is the difference between package name in manifest file and applicationId in build.gradle

package specified in AndroidManifest.xml identify one application installed on the device

Read more from this answer and this also Package Name Vs Application ID

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
-2

applicationId in build.gradle will overwrite the manifest file's package value. And in build.gradle file you can use productFlavors to define different flavors, and each flavor can have different applicationId.

productFlavors {
    free {
        applicationId "com.myapp.free"
    }
    paid {
        applicationId "com.myapp.pro"
    }
}
goodev
  • 624
  • 1
  • 5
  • 10