大佬教程收集整理的这篇文章主要介绍了Gradle Maven插件“安装”任务不适用于Android库项目,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
请参阅github页面(https://github.com/dcendents/android-maven-gradle- plugin)了解最新说明,并找到要使用的正确版本。原始说明不再适用于最新的gradle版本。
我已经修改了Maven插件,使其与androID库项目兼容。参见github上的项目:https : //github.com/dcendents/androID-maven-gradle- plugin
配置您的androID库项目以使用它:
buildscript {
repositorIEs {
mavenCentral()
}
dependencIEs {
classpath 'com.github.dcendents:androID-maven-plugin:1.0'
}
}
apply plugin: 'android-library'
apply plugin: 'androID-maven'
然后,您应该能够使用安装任务将aar安装到本地maven存储库中。
希望这对您有所帮助,如果您发现该插件有问题,请在github上告诉我,我将对其进行修复。
我想将android库项目安装到本地Maven存储库。这是 build.gradle :
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
apply plugin: 'maven'
version = "1.0.0-SNAPSHOT"
group = "com.example"
repositories {
mavenCentral()
}
android {
compileSdkVersion 18
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
}
}
当我跑步时:
gradle install -i
它卡在这里:
ExecuTing task ':project:installTest' due to:
Task has not declared any outputs.
StarTing process 'command 'd:\android-sdk-windows\platform-tools\adb.exe''. Working directory: D:\Projects\java\....... Command: d:\android-sdk-windows\platform-tools\adb.exe install -r D:\Projects\java\.......\build\apk\project.apk
An attempt to initialize for well behaving parent process finished.
successfully started process 'command 'd:\android-sdk-windows\platform-tools\adb.exe''
> Building > :project:installTest
因此,我注意到的第一件事是,由于某种奇怪的原因,它正在尝试将其作为APK部署在设备上。
我是在做错什么,还是只是android-library插件与maven插件不兼容?
以上是大佬教程为你收集整理的Gradle Maven插件“安装”任务不适用于Android库项目全部内容,希望文章能够帮你解决Gradle Maven插件“安装”任务不适用于Android库项目所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。