无法解析Android应用程序模块的Gradle配置。解决gradle构建问题和/或重新同步。

时间:2018-04-09 10:52:19

标签: android firebase

我尝试了一切,但无法得到解决方案..最初更新无法通过android studio工作,所以我卸载了以前的版本并下载并安装了最新版本3.1

下面是我的构建gradle的代码

dependencies {

    implementation fileTree(include: ['*.jar'], dir: 'libs')

    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {

        exclude group: 'com.android.support', module: 'support-annotations'
    })

    //implementation 'de.hdodenhof:circleimageview:2.1.0'      // use this or use the latest compile version. In case u get bug.
    implementation files('libs/picasso-2.5.2.jar')
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.2'

    implementation 'com.google.firebase:firebase-core:12.0.1'
    implementation 'com.google.firebase:firebase-auth:12.0.1'
    implementation 'com.google.firebase:firebase-messaging:12.0.1'
    implementation 'com.android.support:support-v4:26.1.0'

    implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
    implementation 'com.google.android.gms:play-services-auth:12.0.1'
    implementation 'pub.devrel:easypermissions:0.3.0'
    implementation 'com.google.android.gms:play-services-drive:12.0.1'
    implementation 'com.google.api-client:google-api-client:1.23.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'

    implementation('com.google.api-client:google-api-client-android:1.23.0') {

        exclude group: 'org.apache.httpcomponents'

    }
    implementation('com.google.apis:google-api-services-drive:v3-rev87-1.23.0') {

        exclude group: 'org.apache.httpcomponents'

    }

    implementation 'com.synnapps:carouselview:0.1.4'
    implementation 'com.prof.rssparser:rssparser:1.3.1'

    implementation 'com.jakewharton.timber:timber:4.6.0'
    testImplementation 'junit:junit:4.12'

    implementation('com.crashlytics.sdk.android:crashlytics:2.9.0@aar') {

        transitive = true

    }

    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'

    implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'
    // Optional, for RxJava2 adapter
    //compile 'com.andrognito.patternlockview:patternlockview-reactive:1.0.0'

}

apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

我最近遇到过同样的问题。它似乎是按钮中的IDE错误,它检查与firebase服务本身的连接。我必须通过firebase console手动设置一个新项目。