Search code examples
androidandroid-studioandroid-gradle-pluginandroid-library

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


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.


Solution

  • 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.