I use the leanback library to develop for Android TV. My app declare the min API to 16 however the leanback as a minimum API of 16. So as the documentation says I declared this in my manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.mypackage.package">
<uses-sdk tools:overrideLibrary="android.support.v17.leanback" />
However I still have the error :
Error:(6, 5) Execution failed for task ':app:processAdhocProdManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 17 declared in library /thepathtotheapp/build/intermediates/exploded-aar/com.android.support/leanback-v17/22.2.0/AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v17.leanback" to force usage
in the Manifest merger report I can see :
MERGED from io.fabric.sdk.android:fabric:1.0.2:7:5
android:targetSdkVersion
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
android:minSdkVersion
INJECTED from AndroidManifest.xml:0:0
INJECTED from AndroidManifest.xml:0:0
tools:overrideLibrary
ADDED from AndroidManifest.xml:21:15
tools:ignore
ADDED from com.mixpanel.android:mixpanel-android:4.5.4-RC1:14:9
application
ADDED from AndroidManifest.xml:23:5
So it look like it's adding the tools:overrideLibrary but it still fail.
Anyone knows how to fix this ?
tools:overrideLibrary
is for you to then supply a replacement value: tools.android.com/tech-docs/new-build-system/user-guide/… I don't see where you are doing that. – Limbtools:overrideLibrary
yet, and so I was hoping that perhaps putting the values in<uses-sdk>
would help. You could try switching fromtools:overrideLibrary="..."
totools:node="replace"
, which in theory should replace all lower-priority instances of<uses-sdk>
with yours. I have usedtools:node="replace"
, but not on<uses-sdk>
. – Limb