标签: flutter-dependencies

Flutter Firebase 和 Android 问题 - 无法初始化。找不到执行了最新(2020 年 9 月)迁移指令的 google-services.json

我是Flutter开发人员,过去两天我一直在努力让我的应用程序适用于Android。这是一个相当大的应用程序,具有许多不同的功能(主要是谷歌地图和 firebase),可以在 iOS 上完美运行。但是,现在我正在尝试让 Android 部分正常工作,由于某些Firebase问题,我似乎根本无法启动该应用程序。

FlutterFire负责大多数 Firebase 包,他们刚刚发布了一些更新。我花了相当多的时间重构我的项目以符合大多数重大更改。我面临的问题与新更新有关。不幸的是,我遇到的错误并没有让我更接近解决方案。我认为这与无法找到google-services.json的 Android 部分有关。正如我所提到的,在 iOS 上一切正常。所以我的逻辑结论是 Flutter 代码也很好。Google/StackOverflow/FlutterFire 问题似乎都将我误导到对我没有答案的问题。

TL;DR编译到 Android 时,Flutter App 无法启动,因为 Firebase 找不到我的 google-services.json。这是堆栈跟踪:

E/flutter (15568): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: [core/not-initialized] Firebase has not been correctly initialized. Have you added the "google-services.json" file to the project? 
E/flutter (15568):     
E/flutter (15568):     View the Android Installation documentation for more information: https://firebaseextended.github.io/flutterfire/docs/installation/android
E/flutter (15568):     
E/flutter (15568): #0      MethodChannelFirebase.initializeApp (package:firebase_core_platform_interface/src/method_channel/method_channel_firebase.dart:86:9)
E/flutter (15568): <asynchronous …
Run Code Online (Sandbox Code Playgroud)

android firebase google-play-services flutter flutter-dependencies

33
推荐指数
2
解决办法
2万
查看次数

如何在另一个颤振应用程序中使用本地颤振包?

如何在另一个扑动应用程序中使用本地颤振包?

我使用以下命令创建了一个包:

flutter create --template=package my_new_package
Run Code Online (Sandbox Code Playgroud)

然后在我的应用程序源代码=> main.dart

import "package:my_new_package/my_new_package.dart" // can not find the package
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-dependencies

32
推荐指数
3
解决办法
9998
查看次数

flutter_launcher_icons 不起作用未处理的异常:FormatException:无效数字(在字符 1 处)

我想使用 flutter_launcher_icons 更改 flutter 中的应用程序图标:^0.9.2
它在我运行命令时显示错误 错误flutter pub run flutter_launcher_icons:main
的图像


我尝试了很多次但没有新的结果

flutter-dependencies

32
推荐指数
1
解决办法
1万
查看次数

因为sdk的flutter_test每个版本都依赖... flutter_test from sdk被禁止,版本求解失败

当我在我的颤振项目中添加 http 依赖项时,我遇到了这个问题。任何人都可以帮我吗?

在此处输入图片说明

flutter flutter-test flutter-dependencies

30
推荐指数
5
解决办法
3万
查看次数

错误:“ModalBottomSheetRoute”是从两者导入的

错误:“ModalBottomSheetRoute”是从“package:flutter/src/material/bottom_sheet.dart”和“package:modal_bottom_sheet/src/bottom_sheet_route.dart”导入的。

导入'material.dart'隐藏ModalBottomSheetRoute;

dart flutter flutter-dependencies

29
推荐指数
6
解决办法
3万
查看次数

无法获取已安装模拟器运行时的列表

我正在使用 macOS 并且正在安装 flutter。当我跑到“flutter doctor”时,我遇到了类似的错误

\n
    Doctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel stable, 3.13.5, on macOS 13.6 22G120 darwin-arm64, locale\n    tr-TR)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 34.0.0)\n[!] Xcode - develop for iOS and macOS (Xcode 15.0)\n    \xe2\x9c\x97 Unable to get list of installed Simulator runtimes.\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Android Studio (version 2022.3)\n[\xe2\x9c\x93] Connected device (2 available)\n[\xe2\x9c\x93] Network resources\n
Run Code Online (Sandbox Code Playgroud)\n

我不知道为什么。这个错误的根源是什么?

\n

flutter flutter-dependencies flutter-plugin

27
推荐指数
2
解决办法
2万
查看次数

Flutter:找到这个候选人,但参数不匹配

我正在开发一个颤振应用程序,项目运行完美,但突然项目没有运行,它给了我一个错误。

这是我尝试运行应用程序时收到的错误代码

Compiler message:
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
        animation: animation,
        ^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, but the arguments don't match.
  CupertinoFullscreenDialogTransition({
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.15.0/lib/src/picture_stream.dart:92:3: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
  PictureStream();
  ^^^^^^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.15.0/lib/src/picture_stream.dart:192:16: Error: The superclass, 'Diagnosticable', has no unnamed constructor that takes no arguments.
abstract class PictureStreamCompleter extends Diagnosticable {
               ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/extended_image-0.7.2/lib/src/gesture/extended_image_slide_page_route.dart:333:9: Error: No named parameter with the name 'animation'.
        animation: animation,                                           
        ^^^^^^^^^
/C:/flutter/packages/flutter/lib/src/cupertino/route.dart:435:3: Context: Found this candidate, …
Run Code Online (Sandbox Code Playgroud)

compiler-errors run-app dart flutter flutter-dependencies

26
推荐指数
3
解决办法
2万
查看次数

由于app需要SDK版本&gt;=2.15.1 &lt;3.0.0,版本解析失败

谁能告诉我为什么会出现此错误?

\n
The current Dart SDK version is 2.12.0.\n\nBecause app requires SDK version >=2.15.1 <3.0.0, version solving failed.\npub get failed (1; Because app requires SDK version >=2.15.1 <3.0.0, version solving failed.)\n
Run Code Online (Sandbox Code Playgroud)\n

这是我的 flutter --version

\n
Flutter 2.10.1 \xe2\x80\xa2 channel stable \xe2\x80\xa2 https://github.com/flutter/flutter.git\nFramework \xe2\x80\xa2 revision db747aa133 (2 days ago) \xe2\x80\xa2 2022-02-09 13:57:35 -0600\nEngine \xe2\x80\xa2 revision ab46186b24\nTools \xe2\x80\xa2 Dart 2.16.1 \xe2\x80\xa2 DevTools 2.9.2\n\n
Run Code Online (Sandbox Code Playgroud)\n

flutter flutter-dependencies

26
推荐指数
3
解决办法
10万
查看次数

尝试对导入的指令之一使用“作为前缀”,或隐藏除导入指令之外的所有指令的名称

我已经导入了一个 Eosdart 包,它有 action.dart 文件,甚至 flutter 也有 action.dart 文件,所以应该选择哪个有冲突。请帮助消除冲突 我在代码中提到了错误详细信息作为注释,其中我收到了错误



class _AddBorrowerState extends State<AddBorrower> {
  eos.Account _account;
  eos.EOSClient _eosClient = eos.EOSClient(
      'http://jungle2.cryptolions.io:80', 'v1',
      privateKeys: ["5JfVW2PtRkAcLbLETevxCwaQuT8NNWvP2eBYCrPRKPBWDgZDEo1"]);

  List<eos.Authorization> auth = [
    eos.Authorization()
      ..actor = 'guru11111111'
      ..permission = 'active'
  ];

  Map data = {
    'acc_name': myController1.text,**error only static member can be accessed in initializers**
    'b_id': '119',
    'location': 'mumbai',
    'b_phone': '11231212',
  };

  List<eos.Action> actions = [
    eos.Action()
      ..account = 'guru11111111'
      ..name = 'addborrower'
      ..authorization = auth   **ERROR only static member can be accessed in …
Run Code Online (Sandbox Code Playgroud)

eos flutter-dependencies

25
推荐指数
2
解决办法
2万
查看次数

在通道 plugins.flutter.io/path_provider 上找不到方法 getApplicationDocumentsDirectory 的实现

我的 Flutter 应用程序在启动屏幕上冻结,我收到以下错误日志:

Built build\app\outputs\apk\debug\app-debug.apk.
I/Choreographer(18870): Skipped 75 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation(18870): eglMakeCurrent: 0xe8885480: ver 3 0 (tinfo 0xe88835a0)
I/OpenGLRenderer(18870): Davey! duration=2142ms; Flags=1, IntendedVsync=65263803118670, Vsync=65265053118620, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=65265065657900, AnimationStart=65265065738100, PerformTraversalsStart=65265065780200, DrawStart=65265126086300, SyncQueued=65265197367200, SyncStart=65265199471900, IssueDrawCommandsStart=65265199680700, SwapBuffers=65265651453000, FrameCompleted=65265947767800, DequeueBufferDuration=12659000, QueueBufferDuration=920000,
Syncing files to device Android SDK built for x86...
E/flutter (18870): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method getApplicationDocumentsDirectory on channel plugins.flutter.io/path_provider)
Syncing files to device Android SDK built for x86... …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-dependencies

24
推荐指数
5
解决办法
4万
查看次数