我正在尝试使用facebook登录API,但是当我编写"实现"在gradle文件中,我收到一个错误:
Error:(252, 5) error: duplicate value for resource 'attr/font' with config ''.
Error:(252, 5) error: resource previously defined here.
当我点击"跳转到来源"时,Android Studio会将我带入一个文件" values.xml",一个不可写的文件,如下所示:
// More stuff above, the following line is where the error brings me
<dimen name="abc_action_bar_content_inset_material">16dp</dimen>
<dimen name="abc_action_bar_content_inset_with_nav">72dp</dimen>
<dimen name="abc_action_bar_default_height_material">56dp</dimen>
<dimen name="abc_action_bar_default_padding_end_material">0dp</dimen>
<dimen name="abc_action_bar_default_padding_start_material">0dp</dimen>
// More stuff
这是我的应用程序&#39; build.gradle:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 27
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.discodery.android.discoderyapp"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
buildTypes.each {
it.buildConfigField 'Integer', 'RESTAURANT_ID', '2'
}
}
/*
productFlavors {
dev {
}
prod {
}
}*/
dataBinding {
enabled = true
}
}
kapt {
generateStubs = true
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'de.hdodenhof:circleimageview:2.2.0'
//Permissions
compile 'com.beust:klaxon:2.0.11'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.hwangjr.rxbus:rxbus:1.0.5'
compile 'org.parceler:parceler-api:1.1.6'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.google.dagger:dagger:2.7'
compile 'com.facebook.fresco:fresco:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.karumi:dexter:2.3.1'
testCompile 'junit:junit:4.12'
kapt 'com.android.databinding:compiler:2.3.0'
kapt 'org.parceler:parceler:1.1.6'
kapt 'com.google.dagger:dagger-compiler:2.7'
compile 'com.google.android.gms:play-services-vision:11.6.0'
// Facebook SDK Core only (Analytics)
implementation 'com.facebook.android:facebook-core:4.+'
// Facebook Login only
implementation 'com.facebook.android:facebook-login:4.+'
// Facebook Share only
implementation 'com.facebook.android:facebook-share:4.+'
// Facebook Places only
implementation 'com.facebook.android:facebook-places:4.+'
// Facbeook Messenger only
implementation 'com.facebook.android:facebook-messenger:4.+'
// Facebook App Links only
implementation 'com.facebook.android:facebook-applinks:4.+'
// Facebook Android SDK (everything)
implementation 'com.facebook.android:facebook-android-sdk:4.+'
// Audience Network SDK. Only versions 4.6.0 and above are available
implementation 'com.facebook.android:audience-network-sdk:4.+'
// Account Kit
implementation 'com.facebook.android:account-kit-sdk:4.+'
}
repositories {
jcenter()
mavenCentral()
}
apply plugin: 'kotlin-android-extensions'
&#13;
是否有人对这个&#34;实施&#34;或&#34;编译&#34;它可能来自哪条线? 没有facebook sdk实现行,项目就可以编译并正常工作。
由于日志告诉我&#34;重复值&#34;,我认为facebook sdks创建了一些像字符串这样的值,它们具有与其他sdk完全相同的id或名称。
有人有解决方案吗?
修改
问题与facebook sdk的兼容性错误有关。 有没有办法查看依赖是否与另一个相容?