Plugin with id 'com.android.library' not found -


this question has answer here:

i receiving error, when try use library project in android studio. specific line in build.gradle gives error is

apply plugin: 'com.android.library' 

i tried changing to

apply plugin: 'android-library' 

bu still doesn't work, instead says: error:(7, 0) plugin id 'android-library' not found.

i tried add:

classpath 'com.android.tools.build:gradle:1.2.3.+'  

under dependencies in build.gradle, , still nothing...

any help?

edit: whole build.gradle

    // buildscript assemble mopub sdk aar.  repositories {     jcenter() }  apply plugin: 'android-library'  group = 'com.mopub'  description = '''mopub sdk'''  android {     compilesdkversion 22     buildtoolsversion '22.0.1'      defaultconfig {         versioncode 25         versionname "3.8.0"         minsdkversion 9         targetsdkversion 22         consumerproguardfiles 'proguard.txt'     }      sourcesets {         main {             manifest.srcfile 'androidmanifest.xml'             java.srcdirs = ['src/main/java']             resources.srcdirs = ['src/main/java']             aidl.srcdirs = ['src/main']             renderscript.srcdirs = ['src/main']             res.srcdirs = ['res']             assets.srcdirs = ['assets']         }     }      buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), file('proguard.txt')         }     }      // note: need local.properties file set location of sdk in same      // way existing sdk requires, using sdk.dir property.     // alternatively, can set environment variable called android_home. there no      // difference between 2 methods, can use 1 prefer. }  dependencies {     classpath 'com.android.tools.build:gradle:1.2.3.+'     compile 'com.android.support:support-v4:22.0.0'     compile 'com.android.support:support-annotations:22.0.0'     compile 'com.mopub.volley:mopub-volley:1.1.0' }  // don't run robolectric unit tests. check.dependson.remove("test") check.dependson.remove("unittest") check.dependson.remove("testdebug") check.dependson.remove("unittestdebug") 

you need write this:

apply plugin: 'com.android.application' 

replace code in file too:

buildscript {     repositories {         mavencentral() // or jcenter()     }      dependencies {         classpath 'com.android.tools.build:gradle:1.2.3' // 1.3.0-beta2     } } 

Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -