由于缺少依赖关系,Twitter Fabric无法在Android Studio中安装 [英] Twitter Fabric fails to install in Android Studio due to missing dependencies
问题描述
信息:Gradle任务[:generateDebugSources,:generateDebugTestSources]
错误:配置root项目'android'时发生问题。
>无法解析配置的所有依赖关系:_debugCompile。
>找不到com.squareup.picasso:picasso:2.3.2。
在以下位置搜索:
https://maven.fabric.io/public/com/squareup/picasso/picasso/2.3.2/picasso-2.3.2.pom
https ://maven.fabric.io/public/com/squareup/picasso/picasso/2.3.2/picasso-2.3.2.jar
要求:
:android:unspecified> com.twitter.sdk.android:twitter:1.1.1> com.twitter.sdk.android:tweet-ui:1.0.3
>找不到com.android.support:support-v4:21.0.0。
在以下位置搜索:
https://maven.fabric.io/public/com/android/support/support-v4/21.0.0/support-v4-21.0.0.pom
https://maven.fabric.io/public/com/android/support/support-v4/21.0.0/support-v4-21.0.0.jar
要求:
: android:未指定> com.twitter.sdk.android:twitter:1.1.1> com.twitter.sdk.android:tweet-ui:1.0.3
>无法找到com.squareup.retrofit:翻新:1.6.1。
在以下位置搜索:
https://maven.fabric.io/public/com/squareup/retrofit/retrofit/1.6.1/retrofit-1.6.1.pom
https ://maven.fabric.io/public/com/squareup/retrofit/retrofit/1.6.1/retrofit-1.6.1.jar
要求:
:android:unspecified> com.twitter.sdk.android:twitter:1.1.1> com.twitter.sdk.android:twitter-core:1.1.1
>找不到com.google.code.gson:gson:2.2.4。
在以下位置搜索:
https://maven.fabric.io/public/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom
https://maven.fabric.io/public/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
要求:
:android:unspecified> ; com.twitter.sdk.android:twitter:1.1.1> com.twitter.sdk.android:twitter-core:1.1.1
Android SDK更新程序为我提供支持图书馆21.0.3但不是21.0.0,正如在这里从面料Hemal建议: Android Twitter Fabric SDK与支持库冲突
尽管如此,我不知道其他库。任何想法?
请遵循以下代码示例确保您的build.gradle文件类似:
buildscript {
repositories {
jcenter()//< - * add this
maven {url'https ://maven.fabric.io/repo'}
}
依赖项{
classpath'com.android.tools.build:gradle:0.13.3'
// The Fabric Gradle插件使用开放式版本
//快速响应Android工具更新
classpath'io.fabric.tools:gradle:1.+'
}
}
应用plugin:'com.android.application'//< - *确保这是相同的
//在Android插件
之后应用Fabric插件插件:'io.fabric'
仓库{
jcenter()//< - *添加此
maven {url'https://maven.fabric.io/ repo'}
}
我有同样的问题,花了半天时间开了t威胁官方文件,并遇到这种情况:
https://dev.twitter.com/twitter-kit/ android / integration
Fabric架构团队在SO和其他论坛上的答案太多,无法正常工作。这有效。
I'm setting up a Cordova project with Fabric to enable signing in with Twitter. I just installed Fabric plug-in into Android Studio but when I sync Gradle files I get the following error:
Information:Gradle tasks [:generateDebugSources, :generateDebugTestSources]
Error:A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find com.squareup.picasso:picasso:2.3.2.
Searched in the following locations:
https://maven.fabric.io/public/com/squareup/picasso/picasso/2.3.2/picasso-2.3.2.pom
https://maven.fabric.io/public/com/squareup/picasso/picasso/2.3.2/picasso-2.3.2.jar
Required by:
:android:unspecified > com.twitter.sdk.android:twitter:1.1.1 > com.twitter.sdk.android:tweet-ui:1.0.3
> Could not find com.android.support:support-v4:21.0.0.
Searched in the following locations:
https://maven.fabric.io/public/com/android/support/support-v4/21.0.0/support-v4-21.0.0.pom
https://maven.fabric.io/public/com/android/support/support-v4/21.0.0/support-v4-21.0.0.jar
Required by:
:android:unspecified > com.twitter.sdk.android:twitter:1.1.1 > com.twitter.sdk.android:tweet-ui:1.0.3
> Could not find com.squareup.retrofit:retrofit:1.6.1.
Searched in the following locations:
https://maven.fabric.io/public/com/squareup/retrofit/retrofit/1.6.1/retrofit-1.6.1.pom
https://maven.fabric.io/public/com/squareup/retrofit/retrofit/1.6.1/retrofit-1.6.1.jar
Required by:
:android:unspecified > com.twitter.sdk.android:twitter:1.1.1 > com.twitter.sdk.android:twitter-core:1.1.1
> Could not find com.google.code.gson:gson:2.2.4.
Searched in the following locations:
https://maven.fabric.io/public/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom
https://maven.fabric.io/public/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
Required by:
:android:unspecified > com.twitter.sdk.android:twitter:1.1.1 > com.twitter.sdk.android:twitter-core:1.1.1
Android SDK updater gives me Support Library 21.0.3 but not 21.0.0, as suggested here by Hemal from Fabric: Android Twitter Fabric SDK conflict with support library
I have no idea about those other libraries, though. Any thoughts?
Please follow this code example to make sure your build.gradle file is similar:
buildscript {
repositories {
jcenter() // <- *add this
maven { url 'https://maven.fabric.io/repo' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.3'
// The Fabric Gradle plugin uses an open ended version to
// react quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application' // <- *make sure this is the same
//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'
repositories {
jcenter() // <- *add this
maven { url 'https://maven.fabric.io/repo' }
}
I had the same issue, spent half a day on this until opened twitters official documentation and came across this: https://dev.twitter.com/twitter-kit/android/integrate
Too many answers by the Fabric team on SO and other forums that did not work. This works.
这篇关于由于缺少依赖关系,Twitter Fabric无法在Android Studio中安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!