You might be importing Application instead of Module. Well you can change it in module’s gradle also.
Change
apply plugin: 'com.android.application'
to
apply plugin: 'com.android.library'
You also need to remove applicationId from the gradle.
More Related Contents:
- Android Studio: Add jar as library?
- How to manually include external aar package using Gradle for Android
- Android studio adds unwanted permission after running application on real device
- Android Material and appcompat Manifest merger failed
- Adding local .aar files to Gradle build using “flatDirs” is not working
- android studio 0.4.2: Gradle project sync failed error
- Why are there two build.gradle files in an Android Studio project?
- Android dependency has different version for the compile and runtime
- Execution failed for task ‘:app:compileDebugAidl’: aidl is missing
- How to get current flavor in gradle
- Gradle DSL method not found: ‘runProguard’
- Gradle error: Minimum supported Gradle version is 3.3. Current version is 3.2
- Could not find method android() for arguments
- Autoincrement VersionCode with gradle extra properties
- Android Studio Gradle issue upgrading to version 0.5.0 – Gradle Migrating From 0.8 to 0.9 – Also Android Studio upgrade to 0.8.1
- Error:Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’
- Android Studio: Resolving Duplicate Classes
- Unable to Merge Dex – Android Studio 3.0
- Error : Please fix the version conflict either by updating the version of the google-services plugin
- Conflict with dependency ‘com.android.support:support-annotations’. Resolved versions for app (23.1.0) and test app (23.0.1) differ
- How do I read properties defined in local.properties in build.gradle
- How to include a library module dependency in an Android Studio project?
- commons-logging defines classes that conflict with classes now provided by Android after Android Studio Update
- Could not resolve com.android.support:appcompat-v7:26.1.0 in Android Studio new project
- Dex error On Android Studio 3.0 Beta4
- Error:Execution failed for task ‘:ProjectName:mergeDebugResources’. > Crunching Cruncher *some file* failed, see logs
- Android Studio: Re-download dependencies and sync project
- How to exclude res folder from gradle build flavours?
- Could not find property ‘outputFile’ on com.android.build.gradle.internal.api.ApplicationVariantImpl
- Android build gradle is too slow (Dependency Resolution)