gpt4 book ai didi

java - 缺少 Artifact com.google.android :android:jar:4. 4_r1

转载 作者:行者123 更新时间:2023-11-30 09:13:36 25 4
gpt4 key购买 nike

我正在尝试将 Android 4.4_r1 和 Maven 用于一个项目,但出于某种原因,我使用的 maxima maven 版本是 4.1.1.4

我知道 redistribucion android.jar 是不可能的,因此需要 maven-android-sdk-deployer,我已经克隆了项目并运行了命令

mvn clean install -Pall,with-javadoc

并安装所有库,稍后当我编辑pom.xml 文件时出现以下错误

Missing artifact com.google.android:android:jar:4.4_r1

我检查了路径~/.m2/repository/com/google/android/android,我可以看到以下版本

1.5_r4  2.2.1  2.3.1  4.1.1.4  4.2.2_r2  4.3_r2  4.4  4.4_r1

我做错了什么?

最佳答案

来自 https://github.com/mosabua/maven-android-sdk-deployer -

The android.jar artifacts in Maven central are available with the groupId com.google.android, whereas this tool uses android.android to avoid overlap.

这意味着当使用 Maven Android SDK 部署程序时,您的 pom.xml 应该像这样引用 Artifact -

<dependency>
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.4.2_r2</version>
<scope>provided</scope>
</dependency>

注意:Android SDK 中不再提供 4.4_r1,因为它已被 4.4.2_r2 取代。

4.1.1.4 版本是最后一个上传到 Maven Central 的 com.google.android:android 版本,这就是为什么它是您可以使用 com.google.android:android 引用的最新版本。

关于java - 缺少 Artifact com.google.android :android:jar:4. 4_r1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20975751/

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