很可能是由于应用程序的build.gradle中缺少applicationId变量

时间:2016-09-30 11:03:16

标签: android android-studio firebase

我在API 24.0.0转换后出现以下错误

java.lang.IllegalStateException: could not connect to GoogleApiClient: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: Incorrect provider authority in manifest. Most likely due to a missing applicationId variable in application's build.gradle     
Caused by: java.lang.IllegalStateException: Incorrect provider authority in manifest. Most likely due to a missing applicationId variable in application's build.gradle.

1 个答案:

答案 0 :(得分:0)

所以尝试将applicationId粘贴到您的模块gradle上,在defaultConfig中

defaultConfig {
    applicationId "com.example.myapp"
    minSdkVersion 17
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}