简体   繁体   English

配置项目“:firebase_auth”时出现问题?

[英]A problem occurred configuring project ':firebase_auth'?

I've been working on a flutter app.我一直在开发一个颤振应用程序。 Recently I had to re install everything in my pc and ever since then, this error keeps popping up:最近我不得不在我的电脑上重新安装所有东西,从那以后,这个错误不断弹出:

Launching lib/main.dart on SM G615F in debug mode... lib/main.dart:1在调试模式下在 SM G615F 上启动 lib/main.dart... lib/main.dart:1

FAILURE: Build failed with an exception. FAILURE:构建失败并出现异常。

  • What went wrong: A problem occurred configuring project ':firebase_auth'.出了什么问题:配置项目“:firebase_auth”时出现问题。

Could not resolve all dependencies for configuration ':firebase_auth:classpath'.无法解析配置“:firebase_auth:classpath”的所有依赖项。

Could not load module metadata from /home/user/.gradle/caches/modules-2/metadata-2.96/descriptors/org.jetbrains.kotlin/kotlin-stdlib/1.3.50/a8be1fe3b3911d3d3425fe720cf42835/descriptor.bin Failed to notify project evaluation listener.无法从 /home/user/.gradle/caches/modules-2/metadata-2.96/descriptors/org.jetbrains.kotlin/kotlin-stdlib/1.3.50/a8be1fe3b3911d3d3425fe720cf42835/descriptor.bin 加载模块元数据 无法通知项目评估听众。

Could not get unknown property 'android' for project ':firebase_auth' of type org.gradle.api.Project.无法为 org.gradle.api.Project 类型的项目“:firebase_auth”获取未知属性“android”。

Could not find method implementation() for arguments [project ':firebase_core'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.在 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象上找不到参数 [project ':firebase_core'] 的方法 implementation()。

Could not get unknown property 'android' for project ':firebase_auth' of type org.gradle.api.Project.无法为 org.gradle.api.Project 类型的项目“:firebase_auth”获取未知属性“android”。

  • Try: Run with --stacktrace option to get the stack trace.尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志输出。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

I have added all the dependencies necessary:我已经添加了所有必要的依赖项:

dependencies:
  flutter:
    sdk: flutter
  cupertino_icons: ^1.0.2
  intl_phone_number_input: ^0.7.0+2
  flutter_spinkit: ^5.1.0
  provider: ^6.0.2
  firebase_core: ^1.15.0
  firebase_auth: ^3.3.16
  firebase_storage: ^10.2.14
  cloud_firestore: ^3.1.13
  shared_preferences: ^2.0.13
  fluttertoast: ^8.0.9
  get: ^4.6.1

Even the necessary lines in both app level and android level build.gradle are present.甚至应用程序级别和 android 级别build.gradle中的必要行都存在。 There doesn't seem to be any solutions present in here for this particular problem so any help will be greatly appreciated.这里似乎没有针对此特定问题的任何解决方案,因此将不胜感激任何帮助。

I tried removing the dependencies that are throwing the error (shared_preferences, intl_phone_number_input, fluttertoast, firebase_auth, firebase_core, cloud_firestore) and it worked.我尝试删除引发错误的依赖项(shared_preferences、intl_phone_number_input、fluttertoast、firebase_auth、firebase_core、cloud_firestore)并且它起作用了。 Then I added the dependencies again and reloaded the app without stopping it and it still worked fine.然后我再次添加了依赖项并重新加载了应用程序而不停止它,它仍然工作正常。 But when I stopped the app and restarted again, it threw the same error.但是当我停止应用程序并重新启动时,它抛出了同样的错误。

This was an issue with the latest version of flutter.这是最新版本的颤振的问题。 I was using 2.10.5 before and it got updated when I had to reinstall everything.我之前使用的是 2.10.5,当我不得不重新安装所有东西时它得到了更新。 I downgraded it to an older version and cleared the cache and everything got fixed.我将其降级为旧版本并清除了缓存,一切都得到了修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 评估项目“:firebase_auth”时出现问题 - A problem occurred evaluating project ':firebase_auth' 配置项目“:firebase_core”时出现问题 - A problem occurred configuring project ':firebase_core' 配置项目“:firebase_core”时出现问题 - A problem occurred configuring project ':firebase_core' 发生异常。 FirebaseAuthException([firebase_auth/未知] - Exception has occurred. FirebaseAuthException ([firebase_auth/unknown] 配置项目“:DragRecylerView”时出现问题 - A problem occurred configuring project ':DragRecylerView' 在 React Native 中配置项目时出现问题 - A problem occurred configuring project in React Native 配置项目 ':app' 时出现问题。 > compileSdkVersion 未指定 - A problem occurred configuring project ':app'. > compileSdkVersion is not specified 配置根项目“android”时出现问题 Flutter - A problem occurred configuring root project 'android' Flutter 配置项目 ':CordovaLib' 时出现问题。 在离子科尔多瓦 - A problem occurred configuring project ':CordovaLib'. in ionic cordova 配置项目“:@react-native-firebase_messaging”时出现问题。 > compileSdkVersion 未指定 - A problem occurred configuring project ':@react-native-firebase_messaging'. > compileSdkVersion is not specified
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM