asjqkkkk / flutter-todos

📝 one day list app created by flutter!
MIT License
2.05k stars 447 forks source link

flutter run报错 #18

Open dylan-7 opened 4 years ago

dylan-7 commented 4 years ago

Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Running pod install... 1.4s Running Xcode build...

Xcode build done. 14.0s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED

Xcode's output: ↳ /Users/lee/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-4.4.0+hotfix.4/ios/Class es/strategies/NotificationPermissionStrategy.m:71:5: warning: 'UIRemoteNotificationType' is deprecated: first deprecated in iOS 8.0 - Use UserNotifications Framework's UNAuthorizationOptions for user notifications and registerForRemoteNotifications for receiving remote notifications instead. [-Wdeprecated-declarations] UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; ^ In module 'UIKit' imported from /Users/lee/flutterApp/flutter-todos/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPh oneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:69:32: note: 'UIRemoteNotificationType' has been explicitly marked deprecated here typedef NS_OPTIONS(NSUInteger, UIRemoteNotificationType) { ^ /Users/lee/.pub-cache/hosted/pub.flutter-io.cn/permission_handler-4.4.0+hotfix.4/ios/Class es/strategies/NotificationPermissionStrategy.m:71:72: warning: 'enabledRemoteNotificationTypes' is deprecated: first deprecated in iOS 8.0 - Use -[UIApplication isRegisteredForRemoteNotifications] and UserNotifications Framework's -[UNUserNotificationCenter getNotificationSettingsWithCompletionHandler:] to retrieve user-enabled remote notification and user notification settings [-Wdeprecated-declarations] UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; ^ In module 'UIKit' imported from /Users/lee/flutterApp/flutter-todos/ios/Pods/Target Support Files/permission_handler/permission_handler-prefix.pch:2: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPh oneSimulator13.6.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:229:1: note: 'enabledRemoteNotificationTypes' has been explicitly marked deprecated here

Could not build the application for the simulator. Error launching application on iPhone SE (2nd generation).

asjqkkkk commented 4 years ago

拉取一下最新的代码,应该可以了

asjqkkkk commented 4 years ago

目前配置为:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.20.2, on Mac OS X 10.15.3 19D76, locale zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.43.1)
[!] Connected device

! Doctor found issues in 1 category.
dylan-7 commented 4 years ago

可以了🥳,不过可以讲一下原因和解决方法吗?

asjqkkkk commented 4 years ago

可以了🥳,不过可以讲一下原因和解决方法吗?

就是部分插件在当前flutter版本下无法使用的问题,更新一下就好了