首页 文章

詹金斯的Android Maven项目

提问于
浏览
4

我已经尝试过使用Jenkins和我的Android项目,但我还没有进行任何测试 . http://vitorbaptista.com/continuous-integration-for-android-apps-with-jenkins-and-maven3/

当我尝试在Jenkins中构建项目时出现以下错误:

消息:无法在项目上执行目标com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources(default-generate-sources)....:执行默认生成-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources failed:找不到工具'aapt' . 请在插件中提供适当的Android SDK目录路径作为配置参数....作为替代方法,您可以将参数添加到命令行:-Dandroid.sdk.path = ...或设置环境变量ANDROID_HOME . 原因:执行default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources failed:找不到工具'aapt' . 请在插件中提供适当的Android SDK目录路径作为配置参数....作为替代方法,您可以将参数添加到命令行:-Dandroid.sdk.path = ...或设置环境变量ANDROID_HOME .

这是我对Android和Maven的配置:

Jenkins
enter image description here

enter image description here
(该文件夹是正确的,我查了一百万次)
enter image description here

Project

enter image description here

在Jenkins没有访问权限的情况下,我甚至尝试过chmod 777'到我的SDK目录的路径 .

有任何想法吗?

1 回答

  • 6

    不幸的是,它就像安装平台工具一样简单 . 由于我一直通过UI使用SDK,所以我没有考虑安装平台工具 . 安装平台工具后,一切都建成了 .

    命令很简单:

    [sdkdir]/tools/android update sdk --no-ui --filter platform-tool
    

相关问题