androidbuildandroid-manifestandroid-min-sdk

Force tools:overrideLibrary Android


I am getting the following error trying to build my APK:

uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [com.facebook.android:facebook-android-sdk:4.6.0] /Users/jack/...
Suggestion: use tools:overrideLibrary="com.facebook" to force usage

Even after I add the tools:overrideLibrary line to my AndroidManifest, I clean and build the project and receive the exact same failure message.

Has anyone experienced this issue before? I have looked through some similar SO questions and none of the solutions are the fix I am looking for.


Solution

  • You are using a library that its minsdkversion is below your project's minsdkversion.

    Just change your minsdkversion in your build.gradle file of your app to 15 and that will be ok ;)

    There is another way which is not stable. Just force it to use by adding one line of code to your application manifest. See this link:

    How do I use tools:overrideLibrary in a build.gradle file?