gpt4 book ai didi

android - 无法解析配置 ':app:_debugCompile' 的所有依赖项 -Facebook

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:12:45 25 4
gpt4 key购买 nike

我一直在尝试将 facebook 共享集成到我的应用程序中。但我不断收到以下错误:

Error:A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find any version that matches com.android.support:support-v4:[22,23). Searched in the following locations: //jcenter.bintray.com/com/android/support/support-v4/maven-metadata.xml //jcenter.bintray.com/com/android/support/support-v4/ //repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml //repo1.maven.org/maven2/com/android/support/support-v4/ file:/Users/geraldgoh/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/maven-metadata.xml file:/Users/geraldgoh/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/maven-metadata.xml file:/Users/geraldgoh/Library/Android/sdk/extras/google/m2repository/com/android/support/support-v4/ Required by: Facebook:app:unspecified > com.facebook.android:facebook-android-sdk:4.6.0

构建.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.example.dothis.facebook"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

repositories {
mavenCentral()
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
}

Android list 文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dothis.facebook" >

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />


<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

谁能帮我解决这个错误。谢谢。

最佳答案

是因为你编译的依赖信息写错了。

它是 SDK 而不是 SADK。

编译'com.facebook.android:facebook-android-sdk:4.0.0

关于android - 无法解析配置 ':app:_debugCompile' 的所有依赖项 -Facebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32708465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com