标签: flutter-dependencies

Flutter App 无法在运行器内有循环的 IoS 模拟器上运行,并且域 = NSPOSIXErrorDomain,代码 = 63

自 iOS 14 更新以来我遇到了问题。最初它是部署目标 8.0,每次我从 Git 中的存储库中提取数据时,都可以通过更新 GoogleInfoPlist 来暂时修复它。但过了一段时间,这个临时修复就不再起作用了。我的 FlutterFire 插件遇到标头问题。

\n
\n

警告:在框架头文件中用双引号包含“FLTFirebaseCorePlugin.h”,预期使用尖括号 [-Wquoted-include-in-framework-header]\n#import "FLTFirebaseCorePlugin.h"\n^~~~~~~ ~~~~~~~~~~~~~~~~~~\n<firebase_core/FLTFirebaseCorePlugin.h>

\n
\n

在 flutterfire 迁移指南的帮助下,我已将已弃用的 Firebase 核心、身份验证和 firestore 插件更新为最新版本。之后firebase插件问题得到解决。但我仍然遇到 2 个插件的问题:Google Maps Flutter 和 Image Picker。我解决这个问题的方法是将 Cocoapods 更新到 Google 地图插件的测试版,但当我从应用程序中删除该插件时,图像选择器仍然存在问题。

\n

之后我得到了 3 个错误。第一个是 Runner Error 内的 CodeSign 循环:

\n
\n

错误:Runner内部循环;构建可能会产生不可靠的结果。目标“Runner”:CodeSign /Users/user/StudioProjects/app/build/ios/Debug-iphonesimulator/Runner.app\n\xe2\x97\x8b 目标“Runner”具有来自“/”的复制命令用户/vaisatriani/StudioProjects/kuliner_11_app/build/ios/Debug-iphonesimulator/Runner.app' 到

\n
\n

我搜索了修复程序,发现 flutter clean 可以修复该错误。错误确实消失了,但又出现了一个新错误:

\n
\n

错误:'/Users/用户名/StudioProjects/appname/build/ios/Debug-iphonesimulator/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner。应用程序/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/ Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner。应用程序/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/ Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner。应用程序/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/ Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner.app/Runner。 app/Runner.app/GoogleService-Info.plist' 比文件路径缓冲区大小 (1025) 长。(在项目“Runner”的目标“Runner”中)

\n
\n

我以某种方式通过从 XCode 中的产品中删除作为目标的 Runner 来修复它。但现在我陷入了这个错误。

\n
\n

无法在 FFF556AF-19DB-4B7B-93BF-A67EE0EA8621 上安装 …

xcode ios flutter flutter-dependencies

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

Flutter useAnimationController 钩子不会重建小部件

我正在使用 flutter hooks 包在屏幕上对元素进行动画处理,但显然我做错了一些事情,因为该元素没有重建为动画。这是我的代码。

class Ball extends HookWidget {
  @override
  Widget build(BuildContext context) {
    final xController = useAnimationController(
      duration: Duration(seconds: 3),
      lowerBound: 0,
      upperBound: 2,
      initialValue: 1,
    );

    final yController = useAnimationController(
      duration: Duration(seconds: 3),
      lowerBound: 0,
      upperBound: 2,
      initialValue: 1,
    );

    useEffect(() {
      xController.repeat(reverse: true);
      yController.repeat(reverse: true);

      return () {};
    });

    return Align(
      alignment: Alignment(
        xController.value - 1,
        yController.value - 1,
      ),
      child: Container(
        width: 12,
        height: 12,
        decoration: BoxDecoration(
          color: Colors.grey[900],
          shape: BoxShape.circle,
        ),
      ),
    );
  }
} …
Run Code Online (Sandbox Code Playgroud)

dart flutter flutter-dependencies flutter-animation flutter-hooks

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

方法“timeZone”被调用为空。(扑)

我正在尝试在 Flutter 本地通知中使用 zonedshedule 。但异常返回为 null 'timeZone' 被调用为 null。

flutter flutter-dependencies

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

底部导航栏在颤动中溢出

这是我的代码。准确地说,底部导航栏溢出了 12 和 26 像素。有解决办法吗? ** 尝试了各种方法。我还创建了自定义底部导航栏小部件并将其放置在扩展小部件下方。我收到同样的错误(溢出值不同)。现在,我正在使用一个名为 ScrollBottomNavigationBar 的 flutter 包。

import 'package:flutter/material.dart';
import 'package:justchat/components/bottom_navigation_bar.dart';
import 'package:justchat/components/input_box.dart';
import 'package:justchat/constants.dart';
import 'package:justchat/screens/login_screen.dart';
import 'package:scroll_bottom_navigation_bar/scroll_bottom_navigation_bar.dart';

class HomeScreen extends StatelessWidget {
  final controller = ScrollController();
  final items = <BottomNavigationBarItem>[
    BottomNavigationBarItem(
      icon: Icon(
        Icons.home,
        size: 10,
      ),
      label: ("Home"),
    ),
    BottomNavigationBarItem(
      icon: Icon(
        Icons.settings,
      ),
      label: ("Settings"),
    ),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      bottomNavigationBar: ClipRRect(
        borderRadius: BorderRadius.only(
          topRight: Radius.circular(30),
          topLeft: Radius.circular(30),
        ),
        child: Wrap(
          children: [
            ScrollBottomNavigationBar(
              controller: controller,
              items: items, …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-dependencies flutter-layout flutter-bottomnavigation

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

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

Flutter - 无法使用文件选择器访问 iOS 设备中的照片库

请问,有人能帮助我理解为什么在 iOS 中我只能访问 iCloud 文件吗?我需要用户能够从设备库访问文件(视频和图像)。我不确定这是否是权限问题,但在 info.plist 文件中我有这个:

<key>NSCameraUsageDescription</key>
<string>Allows you to take a picture</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allows you to record a voice</string>
<key>NSAppleMusicUsageDescription</key>
<string>Allows you to choose a music</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allows you to choose a picture</string>
<key>UIBackgroundModes</key>
<array>
    <string>audio</string>
    <string>fetch</string>
    <string>processing</string>
    <string>remote-notification</string>
</array>
Run Code Online (Sandbox Code Playgroud)

在 Podfile 中,我还有这个:

目标“跑步者”使用 use_frameworks!

下面是我的代码来挑选视频,最多5个文件,一一选择...

List<Files> _selectedFiles = [];

pickVideos() async {
if (_selectedFiles.length >= 5) {
  Toast.show(t.maximumallowedsizehint, context);
  return;
}
FilePickerResult result = await FilePicker.platform.pickFiles(
  type: FileType.custom,
  // allowCompression: true,
  allowMultiple: true,
  withData: false,
  allowedExtensions: ['mp4'], …
Run Code Online (Sandbox Code Playgroud)

flutter flutter-dependencies

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

Flutter如何获取assets_audio_player中当前的持续时间

我以前使用 just_audio 并且我正在像这样获取当前时间

player.positionStream.listen((event) {
  playerTimeNow = event;
  updatePlayerBar();
});
Run Code Online (Sandbox Code Playgroud)

现在我需要知道如何在这个asset_audio_player中获得时间

audio-player dart flutter flutter-dependencies just-audio

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

在 flutter 中生成 Podfile 的正确方法是什么?

对我来说,删除后生成 pod 文件有两种方法\n第一种是运行 flutter pub get ,然后编辑后会生成如下形式的 pod 文件

\n
# Uncomment this line to define a global platform for your project\n platform :ios, \'10.0\'\npod \'Firebase/Analytics\' #ATTENTION PLEASE SHOULD I ADD THESE PODS HERE?\npod \'Firebase/Auth\'\npod \'Firebase/Firestore\'\npod \'Firebase/Database\'\npod \'Firebase/Messaging\'\n\n# CocoaPods analytics sends network stats synchronously affecting flutter build latency.\nENV[\'COCOAPODS_DISABLE_STATS\'] = \'true\'\n\nproject \'Runner\', {\n  \'Debug\' => :debug,\n  \'Profile\' => :release,\n  \'Release\' => :release,\n}\n\ndef flutter_root\n  generated_xcode_build_settings_path = File.expand_path(File.join(\'..\', \'Flutter\', \'Generated.xcconfig\'), __FILE__)\n  unless File.exist?(generated_xcode_build_settings_path)\n    raise "#{generated_xcode_build_settings_path} must exist. If you\'re running pod install manually, …
Run Code Online (Sandbox Code Playgroud)

ios swift flutter podfile flutter-dependencies

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

Flutter:缓存图像网络提供程序未在(发布模式应用程序)真实构建应用程序中加载图像。(但仅在模拟器中加载图像)

因此,我使用 cached_network_image: ^2.0.0 作为我的应用程序的缓存网络图像提供程序。因此,当我在模拟器上运行该应用程序并通过 USB 调试连接 Android 手机时,缓存网络图像提供程序工作完全正常。所有图像均已正确加载。

但是在构建 apk 版本(发布模式)之后,然后当我在 Android 手机上安装该应用程序时,缓存的网络图像提供程序不会加载图像。仅白色背景可见。

我还完成了 Flutter clean 并升级了 cached_network_image :^3.0.0 然后问题是一样的。

此外,当我使用 NetworkImage 作为图像时,图像可以正确加载。但我想缓存图像以提高应用程序的速度。

那么是否有人知道为什么缓存的网络图像提供程序在 USB 调试中工作得完全正常,而在安装 build app-release.apk 后却无法工作。

我的代码:-

leading: CircleAvatar(backgroundImage: CachedNetworkImageProvider(user.url)),//NetworkImage(user.url)
Run Code Online (Sandbox Code Playgroud)

提前致谢:)

android firebase flutter flutter-dependencies flutter-layout

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

Flutter项目中的项目目录中找不到`Podfile'

即使我有一个 podfile 和一个 podfile.lock,我仍然收到在项目目录中找不到“Podfile”的错误。我已经运行了 flutter clean、flutter pub get、pod init、flutter build iOS,但仍然收到相同的错误消息。我尝试删除 pod 文件,然后运行命令 sumo gem install cocoapod、pod install,然后 flutter build iOS,但仍然遇到相同的错误。

在此处输入代码

cocoa cocoapods flutter flutter-dependencies flutter-ios

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