【问题标题】:Android Twitter Fabric SDK conflict with support libraryAndroid Twitter Fabric SDK 与支持库冲突
【发布时间】:2015-01-12 16:47:51
【问题描述】:

我对 Twitter Fabric SDK 有疑问。当我集成 sdk 并尝试构建时,出现此错误;

错误:找不到:com.android.support:support-v4:21.0.0

这是我的 gradle.build 文件

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/repo' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'

repositories {
    maven { url 'https://maven.fabric.io/repo' }
}

apply plugin: 'io.fabric'

android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.eventz.android"
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 13
        versionName '1.1.2'
    }

    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
dependency.
    compile 'com.android.support:support-v4:21.+'
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.google.android.gms:play-services:5.0.+'
    compile project(':facebook')
    compile fileTree(dir:'libs', include:['*.jar'])
    compile files('libs/volley.jar')
    compile files('libs/Parse-1.5.1.jar')

    compile('com.twitter.sdk.android:twitter:1.0.1@aar') {
        transitive = true;
    }
}

我也尝试删除该支持库,但出现此错误;

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not resolve com.android.support:support-v4:21.0.0.
     Required by:
         Eventz:app:unspecified > com.android.support:appcompat-v7:20.0.0
      > Could not GET 'https://maven.fabric.io/repo/com/android/support/support-v4/21.0.0/support-v4-21.0.0.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve com.android.support:support-v4:21.0.0.
     Required by:
         Eventz:app:unspecified > com.google.android.gms:play-services:5.0.89
      > Could not GET 'https://maven.fabric.io/repo/com/android/support/support-v4/21.0.0/support-v4-21.0.0.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve com.android.support:support-v4:21.0.0.
     Required by:
         Eventz:app:unspecified > Eventz:facebook:unspecified
      > Could not GET 'https://maven.fabric.io/repo/com/android/support/support-v4/21.0.0/support-v4-21.0.0.pom'. Received status code 401 from server: Unauthorized
   > Could not resolve com.android.support:support-v4:21.0.0.
     Required by:
         Eventz:app:unspecified > com.twitter.sdk.android:twitter:1.0.1 > com.twitter.sdk.android:tweet-ui:1.0.1
      > Could not GET 'https://maven.fabric.io/repo/com/android/support/support-v4/21.0.0/support-v4-21.0.0.pom'. Received status code 401 from server: Unauthorized

【问题讨论】:

    标签: android twitter integration twitter-fabric


    【解决方案1】:

    这里来自 Fabric 的 Hemal,我很乐意为您提供帮助。我们需要将 Android L 的支持库作为 Twitter 工具包的一部分,但您应该很容易抓住 - 转到 Android SDK 管理器,然后在此处选择支持库和 v20 的支持存储库进行安装:

    安装完成后,您可以重新构建,一切顺利!告诉我进展如何。

    【讨论】:

    • 所以,这个:get.fabric.io/crashlytics“我们不需要链接到任何其他框架或库。”是不是真的?
    • same here 当我更新 SDK 上的 Extras 时不起作用
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-24
    • 2017-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-15
    相关资源
    最近更新 更多