简体   繁体   中英

i keep getting an error when i try to use google crashlytics

I am trying to use Crashlytics in my app but keep getting an error saying

Error:(30, 1) A problem occurred evaluating root project 'CodeX_TeaXt'. Could not find method buildscripts() for arguments [build_dujqhmp6npuv4v2dkd04dm37r$_run_closure3@30d25365] on root project 'CodeX_TeaXt' of type org.gradle.api.Project.

And here's my code for the build.gradle file :

allprojects {
    repositories {
        google()
        jcenter()}
    }


    task clean(type: Delete) {
    delete rootProject.build``Dir}


    buildscripts{
    repositories {
        // ...
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        // ...
        classpath 'io.fabric.tools:gradle:1.24.4'
    }
}

And:

allprojects {
    // ...
    repositories {
        // ...
        maven {
            url 'https://maven.google.com/'
        }
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

dependencies {
    // ...
    compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
        transitive = true
    }
    compile 'com.google.firebase:firebase-core:11.6.2'
}

I am also having a problem using performance, test lab, so help

You should move:

   maven {
       url 'https://maven.google.com/'
   }

from you app-level build.gradle to you project-level build.gradle based on the instructions in: https://firebase.google.com/docs/crashlytics/get-started

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM