gpt4 book ai didi

zxing - 如何克服构建 Zxing android 应用程序时缺少的依赖项?

转载 作者:行者123 更新时间:2023-12-05 03:47:14 27 4
gpt4 key购买 nike

我正在尝试使用说明 here 构建 Zxing android 应用程序(不是库) .我能够构建 jar 但无法构建应用程序本身。当我运行 mvn package android:apk 时,出现以下错误:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for com.google.android:android:jar is missing. @ line 34, column 17
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.google.zxing:android:4.7.9 (c:\Git\Nucleus\zxing\android\pom.xml) has 1 error
[ERROR] 'dependencies.dependency.version' for com.google.android:android:jar is missing. @ line 34, column 17
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

如有任何帮助,我们将不胜感激。更好的是一些关于使用 Android Studio 构建应用程序的说明。

最佳答案

从下面一行可以看出错误在哪里

[ERROR] 'dependencies.dependency.version' for com.google.android:android:jar is missing. @ line 34, column 17

您需要添加一个有效的 <version>标记到依赖项。检查 Maven repository对于神器,我们可以看到最新版本是4.1.14 .

确保包含依赖项的 POM 看起来像

<platform.version>4.1.1.4</platform.version>

这也被提到为答案here所以我想你也遇到了同样的问题。

关于zxing - 如何克服构建 Zxing android 应用程序时缺少的依赖项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64935071/

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