:app -> :lib1 -> :lib2
:app
minSdk=16, AndroidManifestxml has tools:overrideLibrary="lib2's package"
:lib1 (aar)
minSdk=16
:lib2 (aar)
minSdk=19
Error:
/me/project/lib1/build/intermediates/manifests/tmp/manifestMerger5327563302608474252.xml:5:5 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library /me/project/lib1/build/intermediates/exploded-aar/lib2/unspecified/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="lib2" to force usage
* What went wrong:
Execution failed for task ':lib1:processDebugAndroidTestManifest'.
> java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library /.../lib1/build/intermediates/exploded-aar/android/lib2/unspecified/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="lib2" to force usage
When we open up this manifestMerger5327563302608474252.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.me.lib1.test">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.me.lib1.test"
android:handleProfiling="false"
android:functionalTest="false"
android:label="Tests for com.me.lib1.test"/>
</manifest>
So there seems to be a manifest for tests I do not have, or I am doing something wrong.
I appreciate any suggestions to resolve this.