简体   繁体   中英

com.android.library not find

I use gradle build my android code ,here is my build.gradle

 buildscript {

  repositories {
    jcenter()
  }
    dependencies {
      classpath 'com.android.tools.build:gradle-experimental:0.2.1'    
  }
}

so I can apply plugin:com.android.model.application ,but when I want to depend a module , I got a error:

error:plugin with com.android.library not find

which is my android library module's build.gradle begin with

apply plugin: 'com.android.library

if I write build.gradle like this:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'


    }
}

I cannnot find plugin: 'com.android.model.application' my question is what should I do to depend my library successfully

Hey you have to update the plugin to match the plugins available in the experimental build:

IE. change "com.android.library" to "com.android. model .library"

You can read more about it here on the experimental gradle build documentation. Search for "com.android.model.library" and you'll go right to it.

Be sure to read the other stuff in the doc; there are other differences you will have to add to your old library-model build.gradle file also. (eg. "targetSdkVersion 23" changes to "targetSdkVersion. apiLevel 23"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM