我正在Android Studio中的Android应用程序中创建一个Facebook登录选项。当我把在Android应用程序中将facebook依赖项放入时出错
compile group: 'com.facebook.android', name: 'facebook-android-sdk', version: '4.26.0'
依存性的build.gradle,错误被如来: -
Error:Failed to resolve: com.facebook.android:facebook-android-sdk:4.26.0
的原因是什么。
的gradle这个文件是: -
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.example.android.health"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories{
mavenCentral()
}
dependencies {
// https://mvnrepository.com/artifact/com.facebook.android/facebook-android-sdk
compile group: 'com.facebook.android', name: 'facebook-android-sdk', version: '4.26.0'
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 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
// testCompile 'junit:junit:4.12'
}
显示您的* gradle *。 –
加入gradle文件... – rockz