小编Him*_*nee的帖子

尝试将 Firebase 添加到我的 android 项目时,出现 gradle 同步错误 JAVA_LETTER_OR_DIGIT

当我按照 firebase 指南中的说明添加依赖项并同步项目时,我收到错误 JAVA__LETTER_OR_DIGIT 。我使用 MAC OS X Yosemite 并且我的 android studio 版本是 3.1.4

我的应用等级文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "e.apple.mse_project"
        minSdkVersion 22
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)

我的项目成绩文件

// Top-level build file where you can …
Run Code Online (Sandbox Code Playgroud)

android android-gradle-plugin firebase-realtime-database

4
推荐指数
1
解决办法
2598
查看次数