当我尝试在我的 flutter 应用程序中构建 android 时,我不断收到此错误。这一切都是在我添加时发生的firebase messaging version 7.0.3。即使删除它后,这个问题仍然存在。
/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) 我的 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) 这是我的上传功能。我想要的输出是所有网址的列表,但它返回一个空列表。我尝试了不同的建议解决方案,但都失败了。
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)