找不到类“ com.google.firebase.provider.FirebaseInit

这是应用程序级别的build.gradle


apply plugin: 'com.android.application'

apply plugin: 'android-apt' 


android {

compileSdkVersion 24

buildToolsVersion "24.0.1"


defaultConfig {

    applicationId "com.vfirst.ifbagro"

    minSdkVersion 17

    targetSdkVersion 24

    versionCode 1

    versionName "1.0"

    multiDexEnabled true

}

buildTypes {

    release {

        minifyEnabled false

        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

    }

}

}


dependencies {

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



compile 'com.android.support:appcompat-v7:24.2.1'

compile 'com.android.support:design:24.2.1'

compile 'com.android.support:support-v4:24.2.1'

compile 'com.google.android.gms:play-services-gcm:9.4.0'

compile 'com.google.android.gms:play-services-location:9.4.0'

compile 'com.android.support:multidex:1.0.1'

compile 'com.google.firebase:firebase-messaging:9.4.0'

compile 'com.google.android.gms:play-services:9.4.0'

testCompile 'junit:junit:4.12'

}


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

这是我的应用程序级别build.gradle


// Top-level build file where you can add configuration options common to all sub-projects/modules.


buildscript {

repositories {

    jcenter()

    mavenCentral()

}

dependencies {

    classpath 'com.android.tools.build:gradle:2.2.0'

    classpath 'com.google.gms:google-services:3.0.0'

    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

    classpath 'com.google.gms:google-services:3.0.0'


    // NOTE: Do not place your application dependencies here; they belong

    // in the individual module build.gradle files

}

}


allprojects {

repositories {

    jcenter()

}

}


task clean(type: Delete) {

     delete rootProject.buildDir

}

该如何解决呢?


慕运维8079593
浏览 470回答 3
3回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Android