Codenameone android 构建错误清单合并

Codenameone android build error manifest merger

我一直在使用默认的 codescanner cn1-lib,但我厌倦了必须下载应用程序和外部应用程序来扫描 android 上的二维码。所以我下载了 littlemonkey zbar cn1-lib 并将两个 .cn1lib 文件添加到我的 lib 目录,然后我开始出现构建错误。第一个是关于 minSdkVersion 不能低于库的 sdk 版本所以我更改了构建提示 android.min_sdkversion=15 然后我开始收到主项目的 java 版本不能更低的错误比图书馆所以我改变了 build.xml 所有 'target' 和 'source' 到 1.8 我添加了构建提示 java.version=8 但是我仍然遇到构建错误。 日志给了我 Manifest merger failed with multiple errors, see logs

    Merging result:ERROR
/tmp/build5026335701129669511xxx/MyApplication/src/main/AndroidManifest.xml:43:149-325 Warning:
    Element activity#com.dm.zbar.android.scanner.ZBarScannerActivity at AndroidManifest.xml:43:149-325 duplicated with element declared at AndroidManifest.xml:43:3-149
/tmp/build5026335701129669511xxx/MyApplication/src/main/AndroidManifest.xml:43:114-146 Error:
    Attribute activity#com.dm.zbar.android.scanner.ZBarScannerActivity@label value=(@string/app_name) from AndroidManifest.xml:43:114-146
    is also present at [:ZBarScannerLibrary:] AndroidManifest.xml:18:13-36 value=(Scanner).
    Suggestion: add 'tools:replace="android:label"' to <activity> element at AndroidManifest.xml:43:3-149 to override.

我粘贴了整个日志:https://pastebin.com/tBJJvGkR

你为什么不这样做,Manifest merge 到底给你什么建议?

Suggestion: add 'tools:replace="android:label"' to element at AndroidManifest.xml:43:3-149 to override.

在您的 AndroidManifest.xml<activity> 元素中添加 tools:replace="android:label".

您应该使用代号一设置的扩展部分更新到最新的 QR 扫描器库。它应该可以解决该问题。