2

我在我的项目中使用 gradle 实验。并且有一些本机 c/c++ 代码。我做了一个没有任何 c/c++ 代码的普通项目,并实现了 FCM,它正常工作并给出了一个 fcm 令牌。

但是当我使用 gradle Experiment 即classpath 'com.android.tools.build:gradle-experimental:0.8.3' 时,它会给出 'FirebaseApp 初始化不成功' 任何帮助将不胜感激。

enter code here


apply plugin: 'com.android.model.application'
model {
android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'
    defaultConfig.with {
        applicationId "example.app"
        minSdkVersion.apiLevel 15
        targetSdkVersion.apiLevel 20
        versionCode 1
        versionName "1.0"


    }
    buildTypes {


        debug{
            minifyEnabled false
            proguardFiles.add(file("proguard-rules.pro"))
        }
        release {

            minifyEnabled true
            useProguard  true
            proguardFiles.add(file("proguard-rules.pro"))
            signingConfig = $("android.signingConfigs.config")
            //proguardFiles getDefaultProguardFile('proguard-android.txt'),   'proguard-rules.pro'

        }
    }
    ndk {
        moduleName "native"
    }


}

android.dexOptions {
    javaMaxHeapSize = "4g"
}

}

}

 dependencies {
 compile fileTree(include: ['*.jar'], dir: 'libs')
 compile files('libs/gson-2.3.jar')

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

 compile 'com.squareup:otto:1.3.8'
 compile 'eu.the4thfloor.volley:com.android.volley:2015.05.28'
 compile 'com.google.firebase:firebase-core:9.4.0'
 compile 'com.google.firebase:firebase-messaging:10.0.1'




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

0 回答 0