我正在尝试使用Gradle自动化我的项目.
我有几个应用程序和一个库项目.
在仔细阅读了official doc之后,这是我的build.gradle的简化视图:
buildscript { repositorIEs { mavenCentral() maven { url "http://saturday06.github.io/gradle-androID-scala-plugin/repository/snapshot" } } dependencIEs { // 0.8.3 con Gradle 1.10 classpath 'org.gradle.API.plugins:gradle-androID-plugin:1.2.1' }}apply plugin: 'IDea'project(':MyApp') { ext.apl = true}project(':Mylibrary') { ext.apl = false}subprojects { if (project.apl) { apply plugin: 'androID' dependencIEs { compile 'ch.acra:acra:4.5.0' } } if (project.scala) { apply plugin: 'androID-scala' scala { target "jvm-1.7" addparams '-feature' } } else { apply plugin: 'android-library' } androID { compileSdkVersion 17 buildToolsversion '19.1.0' signingConfigs { ... } defaultConfig { minSdkVersion 8 targetSdkVersion 17 } sourceSets { compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } buildTypes { deBUG { runProguard false proguardfile file('proguard-rules.txt') signingConfig signingConfigs.depurar } release { runProguard true proguardfile file('proguard-rules.txt') signingConfig signingConfigs.entregar } } }}project(':Mylibrary') { dependencIEs { compile "com.github.tony19:logback-androID-core:1.1.1-2" compile "com.github.tony19:logback-androID-classic:1.1.1-2" compile "org.slf4j:slf4j-api:1.7.6" }}project(':MyApp') { dependencIEs { compile 'com.androID.support:appcompat-v7:19.1.0' compile('org.apache.httpcomponents:httpmime:4.1.1') { transitive = false } compile project(':Bibl') }}
我的settings.gradle是:
include 'Mylibrary', 'MyApp'
只有一个build.gradle.
问题是Gradle抱怨说
Plugin with ID 'android-library' not found
每当我尝试使用这个插件.
使用apply plugin:’androID’没有问题.
文档明确指出,必须使用库的“android-library”.
我正在使用Gradle 1.10.
对于像1.2.1这样的最新版gradle-androID-plugin,doc是否已过时?因为官方文档适用于0.9版.
解决方法:
Is the doc outdated for newest versions of gradle-androID-plugin like 1.2.1?
引用the documentation for gradle-android-plugin
:
We are very sorry to announce that development of this plugin has been discontinued. Google has created their own AndroID development toolchain based on Gradle, which supercedes this plugin.
Please see 07001 for further information.
我通常将android-library与官方Gradle for AndroID插件相关联;我不知道弃用的gradle-androID-plugin是否支持它.
总结以上是内存溢出为你收集整理的Gradle:未找到id为’android-library’的插件全部内容,希望文章能够帮你解决Gradle:未找到id为’android-library’的插件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)