我升级了我的Flutter项目2.5到2.10,但是现在没有人我的项目工作,为什么?

o4hqfura  于 2022-12-27  发布在  Flutter
关注(0)|答案(3)|浏览(104)

我升级了我的Flutter项目2.5到2.10,但现在没有人我的项目是工作。我不知道是什么问题。
我已经创建了一个新的项目,我得到这个错误,即使我不使用贝宝软件包

**

Invalid depfile: E:\connnnnnnn\.dart_tool\flutter_build\978de1026cb7b90c4b8dd78f0d48d67b\kernel_snapshot.d
Invalid depfile: E:\connnnnnnn\.dart_tool\flutter_build\978de1026cb7b90c4b8dd78f0d48d67b\kernel_snapshot.d
Error: Couldn't resolve the package 'connevents' in 'package:connevents/paypal-Services/payPal-services.dart'.
Error: Couldn't resolve the package 'webview_flutter' in 'package:webview_flutter/webview_flutter.dart'.
/C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:1:8:

Error: Not found: 'package:connevents/paypal-Services/payPal-services.dart' import 'package:connevents/paypal-Services/payPal-services.dart'; ^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:3:8: Error: Not found: 'package:webview_flutter/webview_flutter.dart' import 'package:webview_flutter/webview_flutter.dart'; ^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:18:3: Error: Type 'PayPalServices' not found. PayPalServices services= PayPalServices(); ^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:58:16: Error: Type 'MethodChannel' not found. static const MethodChannel navigation = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:132:16: Error: Type 'MethodChannel' not found. static const MethodChannel platform = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:218:16: Error: Type 'MethodChannel' not found. static const MethodChannel textInput = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:243:16: Error: Type 'BasicMessageChannel' not found. static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:243:16: Error: Expected 0 type arguments. static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>( ^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:258:16: Error: Type 'BasicMessageChannel' not found. static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:258:16: Error: Expected 0 type arguments. static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>( ^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:274:16: Error: Type 'BasicMessageChannel' not found. static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:274:16: Error: Expected 0 type arguments. static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>( ^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:286:16: Error: Type 'BasicMessageChannel' not found. static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:286:16: Error: Expected 0 type arguments. static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>( ^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:296:16: Error: Type 'MethodChannel' not found. static const MethodChannel platform_views = MethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:307:16: Error: Type 'MethodChannel' not found. static const MethodChannel skia = MethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:321:16: Error: Type 'MethodChannel' not found. static const MethodChannel mouseCursor = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:351:16: Error: Type 'MethodChannel' not found. static const MethodChannel restoration = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:376:16: Error: Type 'MethodChannel' not found. static const MethodChannel deferredComponent = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:391:16: Error: Type 'MethodChannel' not found. static const MethodChannel localization = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/text_input.dart:1439:26: Error: Type 'MethodChannel' not found. static void setChannel(MethodChannel newChannel) { ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/text_input.dart:1530:8: Error: Type 'MethodChannel' not found. late MethodChannel _channel; ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:58:43: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel navigation = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:132:41: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel platform = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:218:42: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel textInput = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:243:56: Error: Method not found: 'BasicMessageChannel'. static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:258:57: Error: Method not found: 'BasicMessageChannel'. static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:274:54: Error: Method not found: 'BasicMessageChannel'. static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:286:61: Error: Method not found: 'BasicMessageChannel'. static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:296:47: Error: Method not found: 'MethodChannel'. static const MethodChannel platform_views = MethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:307:37: Error: Method not found: 'MethodChannel'. static const MethodChannel skia = MethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:321:44: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel mouseCursor = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:351:44: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel restoration = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:376:50: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel deferredComponent = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:391:45: Error: Method not found: 'OptionalMethodChannel'. static const MethodChannel localization = OptionalMethodChannel( ^^^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:18:3: Error: 'PayPalServices' isn't a type. PayPalServices services= PayPalServices(); ^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:18:28: Error: Method not found: 'PayPalServices'. PayPalServices services= PayPalServices(); ^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:156:31: Error: 'NavigationRequest' isn't a type. navigationDelegate: (NavigationRequest request){ ^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:153:14: Error: The method 'WebView' isn't defined for the class '_PayPalPaymentState'. - '_PayPalPaymentState' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart'). Try correcting the name to the name of an existing method, or defining a method named 'WebView'. body: WebView( ^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart:155:26: Error: The getter 'JavascriptMode' isn't defined for the class '_PayPalPaymentState'. - '_PayPalPaymentState' is from 'package:flutter/src/services/platform_channel.dart' ('/C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/platform_channel.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'JavascriptMode'. javascriptMode: JavascriptMode.unrestricted, ^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:58:16: Error: 'MethodChannel' isn't a type. static const MethodChannel navigation = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:132:16: Error: 'MethodChannel' isn't a type. static const MethodChannel platform = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:218:16: Error: 'MethodChannel' isn't a type. static const MethodChannel textInput = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:243:16: Error: 'BasicMessageChannel' isn't a type. static const BasicMessageChannel<Object?> keyEvent = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:258:16: Error: 'BasicMessageChannel' isn't a type. static const BasicMessageChannel<String?> lifecycle = BasicMessageChannel<String?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:274:16: Error: 'BasicMessageChannel' isn't a type. static const BasicMessageChannel<Object?> system = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:286:16: Error: 'BasicMessageChannel' isn't a type. static const BasicMessageChannel<Object?> accessibility = BasicMessageChannel<Object?>( ^^^^^^^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:296:16: Error: 'MethodChannel' isn't a type. static const MethodChannel platform_views = MethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:307:16: Error: 'MethodChannel' isn't a type. static const MethodChannel skia = MethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:321:16: Error: 'MethodChannel' isn't a type. static const MethodChannel mouseCursor = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:351:16: Error: 'MethodChannel' isn't a type. static const MethodChannel restoration = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:376:16: Error: 'MethodChannel' isn't a type. static const MethodChannel deferredComponent = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/system_channels.dart:391:16: Error: 'MethodChannel' isn't a type. static const MethodChannel localization = OptionalMethodChannel( ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/text_input.dart:1439:26: Error: 'MethodChannel' isn't a type. static void setChannel(MethodChannel newChannel) { ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/services/text_input.dart:1530:8: Error: 'MethodChannel' isn't a type. late MethodChannel _channel; ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/rendering/binding.dart:342:11: Error: 'MethodChannel' isn't a type. const MethodChannel methodChannel = MethodChannel('flutter/service_worker'); ^^^^^^^^^^^^^ /C:/flutter_windows_2.10.4-stable/packages/flutter/lib/src/rendering/binding.dart:342:41: Error: Method not found: 'MethodChannel'. const MethodChannel methodChannel = MethodChannel('flutter/service_worker'); ^^^^^^^^^^^^^ Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aconnevents%2Fpaypal-Services%2FpayPal-services.dart; message=StandardFileSystem only supports file:* and data:* URIs) #0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34:7) #1 asFileUri (package:vm/kernel_front_end.dart:623:37) #2 writeDepfile (package:vm/kernel_front_end.dart:763:21) #3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:586:9) #4 starter (package:flutter_frontend_server/server.dart:85:12)

**

lrl1mhuk

lrl1mhuk1#

1.安卓/应用程序/构建版本.gradle

编译Sdk版本:31或更高版本的android { compileSdkVersion 31

**2.**转到文件〉项目结构并选择Android API 31平台

f87krz0w

f87krz0w2#

打开Flutter终端运行..

拍打干净
舞动酒吧


build.gradle依赖关系类路径升级

bq3bfh9z

bq3bfh9z3#

我昨天也遇到了同样的问题,我跑得很累
git清理-xfd
git拉力
Flutter 刮刀
在cmd中,我一直得到:
fatal:不是git仓库(或任何父目录):. git语言
最后我放弃了,我删除了旧的flutter sdk目录从我的PC以及路径从环境变量,我下载了新的sdk和安装flutter再次,现在它运行良好
https://docs.flutter.dev/get-started/install

相关问题