如何通过缺失的依赖项构建Zxing android应用程序?
我正在尝试使用说明构建Zxing android应用程序(而不是库)。我能够构建JAR,但无法构建应用程序本身。当我运行mvn软件包android:apk时,出现以下错误:如何通过缺失的依赖项构建Zxing android应用程序?,zxing,Zxing,我正在尝试使用说明构建Zxing android应用程序(而不是库)。我能够构建JAR,但无法构建应用程序本身。当我运行mvn软件包android:apk时,出现以下错误: [INFO] Scanning for projects... [ERROR] [ERROR] Some problems were encountered while processing the POMs: [ERROR] 'dependencies.dependency.version' for com.google.
[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构建应用程序的说明。检查是否遗漏了对依赖项的标记
您还可以检查答案以更好地理解。您可以从下面的行中看到错误所在 [错误]“com.google.android:android:jar的dependencies.dependency.version”丢失。@第34行第17栏 您需要向依赖项添加有效的
标记。检查工件的最新版本是4.1.14
确保包含依赖项的POM看起来像
4.1.1.4
这也是一个答案,所以我想你也有同样的问题。如果你进入包含
com.google.android:android
依赖项的pom.xml
,它有版本标签吗?如果添加4.1.1.4
并再次尝试Maven安装,会发生什么情况?@Matt Yours看起来是正确答案。你应该把这个作为一个答案贴出来,这样我就可以收回我的答案,投你的一票。在赏金分配完成后(因为否则我们无法完成),这个问题应该作为一个副本结束。你能将我的答案中的原始答案链接包含在你的答案中,然后评论ping我吗?@LSerni添加了一个答案;谢谢你让我知道。