【发布时间】:2019-03-14 10:15:01
【问题描述】:
我是android开发的新手,很长一段时间以来,我一直陷入一个错误,即运行您的应用程序以验证安装(检查应用程序是否已与我们的服务器通信。您可能需要卸载并重新安装您的应用程序。)
build.gradle(Module:app)
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'
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'
implementation 'com.google.firebase:firebase-core:16.0.1'
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
【问题讨论】:
-
我想你忘了
apply plugin: 'com.google.gms.google-services'部分要添加到依赖项部分的下方和外部 -
对于我在 VScode 上使用 reactnative 的问题是这个插件上的双引号。当我应用插件:“com.google.gms.google-services”而不是应用插件:“com.google.gms.google-services”时,它起作用了