小编Bri*_*ht 的帖子

在 flutter 中构建 Android 时出现“错误:找不到符号”

当我尝试在我的 flutter 应用程序中构建 android 时,我不断收到此错误。这一切都是在我添加时发生的firebase messaging version 7.0.3。即使删除它后,这个问题仍然存在。

\n
/Users/bright/Desktop/flutter_apps/rush_user_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:20: error: cannot find symbol\n    flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin());\n                                                                                          ^\n  symbol:   class FlutterAndroidLifecyclePlugin                         \n  location: package io.flutter.plugins.flutter_plugin_android_lifecycle \n/Users/bright/Desktop/flutter_apps/rush_user_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:24: error: cannot find symbol\n    flutterEngine.getPlugins().add(new io.flutter.plugins.googlemaps.GoogleMapsPlugin());\n                                                                    ^   \n  symbol:   class GoogleMapsPlugin                                      \n  location: package io.flutter.plugins.googlemaps                       \n/Users/bright/Desktop/flutter_apps/rush_user_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:25: error: cannot find symbol\n    flutterEngine.getPlugins().add(new io.flutter.plugins.googlesignin.GoogleSignInPlugin());\n                                                                      ^ \n  symbol:   class GoogleSignInPlugin                                    \n  location: package io.flutter.plugins.googlesignin                     \n/Users/bright/Desktop/flutter_apps/rush_user_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:26: error: cannot find symbol\n    flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin());\n                                                                     ^  \n  symbol:   class ImagePickerPlugin                                     \n  location: package io.flutter.plugins.imagepicker                      \n/Users/bright/Desktop/flutter_apps/rush_user_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:30: error: cannot find symbol\n    flutterEngine.getPlugins().add(new …
Run Code Online (Sandbox Code Playgroud)

java android kotlin flutter

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

Pod 安装未在 Flutter 应用程序中安装 Pod

我的 flutter 应用程序在 android 模拟器上运行良好,但在尝试在 ios 模拟器上启动时,它pod install 永远运行该命令。

这是结果

于是我打开Xcode,发现这个错误:

沙箱与 Podfile.lock 不同步。运行“pod install”或更新你的 CocoaPods 安装。

这是我的podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def parse_KV_file(file, separator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  generated_key_values = {}
  skip_line_start_symbols = …
Run Code Online (Sandbox Code Playgroud)

xcode ios cocoapods flutter podfile-lock

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

如何在 flutter 中将多个图像上传到 firebase 并获取它们的所有下载网址

这是我的上传功能。我想要的输出是所有网址的列表,但它返回一个空列表。我尝试了不同的建议解决方案,但都失败了。

Future<List<String>> uploadFiles(List _images) async {
  List<String> imagesUrls=[];

   _images.forEach((_image) async{
    StorageReference storageReference = FirebaseStorage.instance
        .ref()
        .child('posts/${_image.path}');
    StorageUploadTask uploadTask = storageReference.putFile(_image);
    await uploadTask.onComplete;

     imagesUrls.add(await storageReference.getDownloadURL());
     
  });
print(imagesUrls);
return imagesUrls;
}
Run Code Online (Sandbox Code Playgroud)

dart firebase flutter firebase-storage

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