icebp
icebp

Reputation: 1709

Facebook sdk for Android version mismatch

I followed the steps from the getting started Facebook SDK tutorial, but when I try to build my application it fails with:

\app\src\main\AndroidManifest.xml Error: uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [com.facebook.android:facebook-android-sdk:4.11.0] \app\build\intermediates\exploded-aar\com.facebook.android\facebook-android-sdk\4.11.0\AndroidManifest.xml

I don't understand where this is comming from as there is no minSdkVersion in AndroidManifest.xml and I'm stuc without knowing what should I do.

Upvotes: 0

Views: 224

Answers (2)

lejonl
lejonl

Reputation: 1483

You can override the error and get you project to build by adding the following to your manifest:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest 
        xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.example.yourappname"
        xmlns:tools="http://schemas.android.com/tools"
        >
        <uses-sdk tools:overrideLibrary="com.facebook, android.support.customtabs" />

But then I guess you need to add a check for API version surrounding all calls to the Facebook SDK

Upvotes: 0

agomes
agomes

Reputation: 331

The minSdkVersion is coming in from the build.gradle file of the Facebook sdk.

See https://developers.facebook.com/docs/android , it states that minSdkVersion required for the Facebook Sdk is 15

Upvotes: 0

Related Questions