Android系统。 Firebase:无法解析Android应用程序模块

我的build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext.kotlin_version = '1.1.3-2' ext.realm_version = '3.7.2' repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:3.1.0' classpath "io.realm:realm-gradle-plugin:$realm_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() maven { url "https://maven.google.com" } maven { url 'https://dl.bintray.com/jetbrains/anko' } } } task clean(type: Delete) { delete rootProject.buildDir } repositories { mavenCentral() } 

我的应用程序/ build.gradle

 buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.+' } } apply plugin: 'com.android.application' apply plugin: 'kotlin-kapt' apply plugin: 'kotlin-android' apply plugin: 'io.fabric' apply plugin: 'realm-android' realm { syncEnabled = true; } repositories { maven { url 'https://maven.fabric.io/public' } mavenCentral() } android { compileSdkVersion 26 buildToolsVersion "25.0.3" dexOptions { jumboMode = true } defaultConfig { applicationId "com.my.project" minSdkVersion 15 targetSdkVersion 23 versionCode 54 versionName "1.3.54" multiDexEnabled true } } def AAVersion = '4.3.1' dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:26.1.0' compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') { transitive = true; } compile('com.digits.sdk.android:digits:1.11.0@aar') { transitive = true; } compile 'com.android.support:multidex:1.0.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.volley:volley:1.0.0' compile 'com.baoyz.swipemenulistview:library:1.3.0' compile 'com.google.android.gms:play-services-gcm:11.0.4' compile 'com.google.code.gson:gson:2.7' compile 'com.miguelcatalan:materialsearchview:1.4.0' compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.3' compile 'com.squareup.okhttp:okhttp:2.7.3' compile 'com.theartofdev.edmodo:android-image-cropper:2.2.5' compile 'commons-codec:commons-codec:1.9' compile 'commons-io:commons-io:2.4' compile 'io.realm:android-adapters:2.0.0' compile 'org.apache.commons:commons-lang3:3.4' compile 'org.apache.httpcomponents:httpcore:4.4.4' compile 'org.apache.httpcomponents:httpmime:4.3.6' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile 'us.feras.mdv:markdownview:1.1.0' compile 'org.jetbrains.anko:anko-sdk15:0.9.1' compile "org.androidannotations:androidannotations-api:$AAVersion" // for annotaions kapt "io.realm:realm-android-library:$realm_version" kapt "org.androidannotations:androidannotations:$AAVersion" compile 'com.firebaseui:firebase-ui-auth:2.3.0' compile 'com.google.firebase:firebase-auth:11.0.4' compile "com.android.support:design:26.1.0" compile "com.android.support:customtabs:26.1.0" compile "com.android.support:cardview-v7:26.1.0" testCompile 'junit:junit:4.12' } apply plugin: 'com.google.gms.google-services' 

当我建立我得到错误:

 Error:Execution failed for task ':app:processDevGoogleServices'. > File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: com\my_project\app\src\dev\google-services.json com\my_project\\app\google-services.json 

确定。在Android Studio中选择菜单: 工具 – > Friebase

  1. Firebase->验证
  2. 点击电子邮件和密码认证
  3. 将您的应用连接到Firebase

并得到错误:

无法解析Android应用程序模块