简体   繁体   English

APK 中的 AndroidManifest.xml 未转换为二进制

[英]AndroidManifest.xml inside APK is not converted to binary

The apk that I build using gradlew assembleVariant builds OK, but for some reason the AndroidManifest.xml inside the apk is not in binary format.我使用gradlew assembleVariant构建的 apk 构建正常,但由于某种原因,apk 中的AndroidManifest.xml不是二进制格式。 I can open it just fine in a text editor, which is unexpected.我可以在文本编辑器中打开它,这是出乎意料的。 Other variants of my app don't have this issue and their manifests come out in binary format.我的应用程序的其他变体没有这个问题,它们的清单以二进制格式出现。 I need it in binary format because that's the input that the next tool in the chain expects.我需要二进制格式,因为这是链中下一个工具所期望的输入。 I am using Android gradle plugin 4.0.1.我正在使用 Android gradle 插件 4.0.1。 This wasn't an issue in 3.5.4.这在 3.5.4 中不是问题。

Anyone have any ideas why this could be happening?任何人都知道为什么会发生这种情况?

I was using android.useNewApkCreator=false which helped me get past another issue: Entry name 'AndroidManifest.xml' collided .我正在使用android.useNewApkCreator=false这帮助我解决了另一个问题: Entry name 'AndroidManifest.xml' collided

This is not a good fix though, because the resulting AndroidManifest.xml is not the one you would want anyway.但这不是一个好的解决方法,因为无论如何生成的AndroidManifest.xml都不是您想要的。 Find the conflicting AndroidManifest.xml and either exclude it or incorporate it in your app.找到冲突的AndroidManifest.xml并将其排除或合并到您的应用程序中。 Specifically mine came from a dependency that used CordovaLib.特别是我的来自使用 CordovaLib 的依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM