gpt4 book ai didi

Jenkins 上的 Android Maven 项目

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:40:26 24 4
gpt4 key购买 nike

我已经尝试在我使用 Maven 的 Android 项目中使用 Jenkins。我已经尝试按照本教程进行操作,但模拟器部分除外,因为我还没有进行任何测试(还)。 http://vitorbaptista.com/continuous-integration-for-android-apps-with-jenkins-and-maven3/

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

message : Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources (default-generate-sources) on project ....: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter ... in the plugin . As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. cause : Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter ... in the plugin . As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME.

这是我针对 Android 和 Maven 的配置:

Jenkins enter image description here enter image description here(那个文件夹是正确的,我已经检查了一百万次) enter image description here

项目

enter image description here

在 Jenkins 无法访问的情况下,我什至尝试过 chmod 777'ing 到我的 SDK 目录的路径。

有什么想法吗?

最佳答案

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

命令很简单:

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

关于Jenkins 上的 Android Maven 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12626494/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com