Skip to content Skip to sidebar Skip to footer

How Does The New Applicationid In Build.gradle Work?

Google released version 0.11 of the Android Gradle plugin. The release notes contains the following: One of the user visible changes in 0.11 is that we've deprecated the packa

Solution 1:

package specified in AndroidManifest.xml identify one application installed on the device. The name of the property itself is misleading because one may think that refactoring java classes may require renaming package property as well. package property can be any string respecting limitation described in javadoc.

Because this confusion Google guys decided to rename package to applicationId. However, this change apply to gradle file only. Changing manifest property name would break compatibility with previous versions, that's my guess.

So when you build your APK, gradle replaces manifest's package property value with applicationId value specified in gradle script.

If you would like to test it yourself. Just set applicationId with different value that your manifest's package and build APK. Then go to folder /build/intermediates/manifests/dev/debug and open AndroidManifest.xml. You will find there applicationId value.

Post a Comment for "How Does The New Applicationid In Build.gradle Work?"