Android 我被firebase授权卡住了
我正试图将firebase连接到我的Flatter项目中,经过大量的研究,我仍然不知道这个bug。我正在尝试连接身份验证,按照教程一步一步地进行,但它似乎不起作用 有人请帮帮我:V,我只有1.5个月了。(顺便说一句,如果stackoverflow,我不知道如何发布正确的版本,我很抱歉) 这里,写在控制台上 失败:生成失败,出现异常Android 我被firebase授权卡住了,android,firebase,flutter,authentication,gradle,Android,Firebase,Flutter,Authentication,Gradle,我正试图将firebase连接到我的Flatter项目中,经过大量的研究,我仍然不知道这个bug。我正在尝试连接身份验证,按照教程一步一步地进行,但它似乎不起作用 有人请帮帮我:V,我只有1.5个月了。(顺便说一句,如果stackoverflow,我不知道如何发布正确的版本,我很抱歉) 这里,写在控制台上 失败:生成失败,出现异常 其中: 生成文件'C:\flatter\u Project\firebase\u authentication\android\Build.gradle'行:25
- 其中: 生成文件'C:\flatter\u Project\firebase\u authentication\android\Build.gradle'行:25
- 出了什么问题: 评估根项目“android”时出现问题
- 尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。使用--scan运行以获得完整的洞察力
- 得到更多的帮助
这个问题就出现了 (-)无法解析符号“属性”
()抛出新的GradleException(“未找到颤振SDK。在local.properties文件中使用颤振.SDK定义位置。”) 这是build.gradle的代码
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services' // this is line 25
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.firebase_authentication"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
// Import the Firebase BoM
implementation platform('com.google.firebase:firebase-bom:28.0.0')
// Add the dependency for the Firebase SDK for Google Analytics
// When using the BoM, don't specify versions in Firebase dependencies
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-firestore'
// Add the dependencies for any other desired Firebase products
// https://firebase.google.com/docs/android/setup#available-libraries
}
请,善良的人们先把颤振清理干净,机器似乎找不到你的颤振。sdk 您是否已将firebase google-services.json中的文件放入android/app文件夹 还要添加firebase的从属关系吗?在文件build.grandle中,但在android/app文件夹中不
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.5'
}
}