添加Fabric for crash报告后,我无法在gradle中添加新的lib

时间:2015-06-09 10:24:11

标签: android gradle rate

我刚刚安装了用于崩溃监控的Fabric Fabric,但是现在,我正在尝试添加一个库来评估你的应用程序(编译'com.androidsx:rate-me:4.0.0')但是现在gradle停止显示它无法解析库。

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'android'
apply plugin: 'io.fabric'

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

dependencies {
    compile('com.crashlytics.sdk.android:crashlytics:2.3.2@aar') {
        transitive = true;
    }
    compile 'com.android.support:support-v4:22.1.1'
    compile files('libs/library-1.0.6.jar')
    compile files('libs/gcm.jar')
    compile files('libs/acra-4.6.1.jar')
    compile files('libs/acra-4.6.1-sources.jar')
    compile files('libs/acra-4.6.1-javadoc.jar')
    compile files('libs/TestFlightLib.jar')
    compile files('libs/crouton-1.8.4.jar')
    compile project(':LVL')
    compile files('libs/bugsense-3.5.jar')
    compile 'com.androidsx:rate-me:4.0.0'
}

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
    }
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

        instrumentTest.setRoot('tests')
    }
}

输出:

Output

有什么问题?

1 个答案:

答案 0 :(得分:0)

解决:

    存储库部分中缺少
  • jcenter()

感谢。