admin管理员组

文章数量:1122818

I have an issue revolving around android:supportsRtl, though it’s certainly not specific to that property. Let me start by saying that when invoking the Gradle task :app:processDebugManifest everything is shiny.

However, with :app:processDebugUnitTestManifest, I got an error:

Manifest merger failed : Attribute application@supportsRtl value=(false) from [:app] AndroidManifest.xml:64:9-36
    is also present at [com.whatever:library:0.5.0] AndroidManifest.xml:7:18-44 value=(true).
    Suggestion: add 'tools:replace="android:supportsRtl"' to <application> element at tempFile2ProcessTestManifest107.xml:17:5-19:19 to override.

Note again that this error only occurs when processing the unit tests, which is the first bit I don’t understand. I can fix the error by adding a file app/src/test/AndroidManifest.xml that contains the required tools:replace bit. Now the build runs better – but I get the warning:

application@android:supportsRtl was tagged at AndroidManifest.xml:4 to replace other declarations but no other declaration present

I can toggle between the error and the warning. While the latter is better, I would prefer complete silence in that matter.


[EDIT] Question was closed with a reference to Is `android:supportsRtl="true"` in the Library Manifest essential? It is causing error sometimes which contains no answer at all to any of my raised issues. The ‘solution’ proposed there was even already mentioned here.

本文标签: In Android manifesthow to replace declaration silentlyStack Overflow