更新Gradle依赖项后无法解析Firebase模块

时间:2018-06-11 19:55:22

标签: android android-studio android-gradle

我已将项目更新为最新的依赖项,也将compile更改为implementationsgradle个插件,我有此错误

  

无法解决:firebase-analytics打开文件

     

无法解决:play-services-tasks打开文件

     

无法解决:play-services-ads-identifier打开文件

     

无法解决:play-services-stats打开文件

     

无法解决:play-services-basement打开文件

模块

apply plugin: 'com.android.application'



android {

    compileSdkVersion 28
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "my.id"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 36
        versionName "2.04"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        //multiDexEnabled true
    }
    buildTypes {
        release {
            debuggable false
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
        debug {
        }
    }
    productFlavors {
    }
}

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 files('libs/chartboost.jar')
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:percent:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.jakewharton:butterknife:8.8.1'
    implementation 'com.github.polok:clicknumberpicker:0.1.2'
    implementation 'com.android.volley:volley:1.0.0'
    implementation 'com.kila.apprater_dialog.lars:apprater-dialog:1.0.5'
    implementation 'com.android.support:cardview-v7:27.1.1'

    implementation 'com.google.firebase:firebase-core:16.0.0'
    implementation 'com.google.firebase:firebase-crash:16.0.0'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'com.google.firebase:firebase-ads:15.0.1'
    implementation 'com.google.firebase:firebase-messaging:17.0.0'

    implementation 'com.android.billingclient:billing:1.0'
    testImplementation 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}

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

项目

buildscript {
    repositories {
        jcenter()
        google()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:4.0.1'
        classpath "io.realm:realm-gradle-plugin:3.5.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()

    }

}

task clean(type: Delete) {
    delete rootProject.buildDir
}

试过很多组合,有人可以帮忙吗?

0 个答案:

没有答案