Help us understand the problem. What is going on with this article?

Android Facebook SDK で Support Library を exclude する

More than 3 years have passed since last update.

Facebook SDK が Support Library のバージョンを固定しているので、自前のものと衝突した。

Support Library は、この記事を書いている時点だと25系の最新が 25.4.0 でこれを使いたい。ところが Facebook SDK は 25.3.1 固定となっている。

https://github.com/facebook/facebook-android-sdk/blob/master/facebook/build.gradle

compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:customtabs:25.3.1'

gradleの依存関係で明示的に Support Library を使いつつ

dependencies {
    compile "com.android.support:support-v4:25.4.0"
    compile "com.android.support:support-compat:25.4.0"
    compile 'com.android.support:support-annotations:25.4.0'
    compile "com.android.support:appcompat-v7:25.4.0"
    compile "com.android.support:cardview-v7:25.4.0"
    compile 'com.android.support:customtabs:25.4.0'
    ...

Facebookの箇所で該当moduleを除外して使う。

compile ('com.facebook.android:facebook-android-sdk:[4,5)') {
    exclude group: 'com.android.support', module: 'support-v7'
    exclude group: 'com.android.support', module: 'appcompat-v7'
    exclude group: 'com.android.support', module: 'customtabs-v7'
    exclude group: 'com.android.support', module: 'cardview-v7'
}
najeira
Software developer。Google Cloud(特にApp Engine)とFlutterのGoogle Developers Expert。好きな言語はGo。他Flutter/Dart, Android, iOS, Python。
michael-inc
マイケルはコミュニティサービスをつくる会社、「Community Builder」です。インターネットを通して人生がより豊かになるよう、人がつながる場所をつくりつづけます。
https://michael-inc.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした