我现在正在学校做我的项目,在那里我需要连接我在Firebase的应用程序。我正在使用Android 2.3.3。在应用程序和防火墙之间的连接中,使用firebase助手,没有问题。当我添加依赖项时,我的gradle因此错误而失败。
Build.gradle(模块:app)文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.user.conread"
minSdkVersion 19
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 {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'错误是
错误:连接超时:连接
虽然我得到了这个错误,但它显示在助手身上。
正确设置了依赖项。
谢谢你的帮助。
发布于 2017-12-18 07:51:35
在我的例子中,Windows 10防火墙阻止了android,我也收到了同样的消息。
错误:连接超时:连接。
也许它会对某人有帮助。
发布于 2018-03-27 03:04:34
一些解决办法:
1构建->清洁项目
2构建->重建项目
3构建->制造项目
4从设备中删除应用程序,然后重试安装。
5 Mb你的应用程序的实际版本有一些问题(尝试拉出真正的分支)。此外,如果您的应用程序正在运行,您也可以检查一下您的emmulator。
6尝试使用1,2,3,4种解决方案。
发布于 2018-04-24 16:37:37
转到您的build.gradle文件并删除存储库中的google()。然后再试一次。你的项目会成功的。
https://stackoverflow.com/questions/47393989
复制相似问题