Android Studio 1.0 and error "Library projects cannot set applicationId"

Seraphim's picture Seraphim's · Dec 9, 2014 · Viewed 48.9k times · Source

After updating Android Studio to 1.0, I see this error:

Error: Library projects cannot set applicationId. applicationId is set to 'com.super.app' in default config.

I updated the Gradle plugin as suggested but I did not understand how to fix this.

Answer

Joel picture Joel · Dec 9, 2014

Based on this info:

ApplicationId in Library Projects

You cannot use applicationId to customize the package of a library project. The package name has to be fixed in library projects (and specified as packageName in the manifest). The Gradle plugin did not enforce this restriction earlier.

Removing applicationId variable from the library's build.gradle file should resolve the issue.