5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Android Facebook SDK で Support Library を exclude する

Last updated at Posted at 2017-08-25

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

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

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'
}
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?