Flutter 更新1.20版本遇到的坑

1.许多插件无法使用

更新一下版本号,然后,关机重启一下应该就可以了

2.启动iOS模拟器遇到问题Method does not override any method from its superclass

更新application的代码

override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }

3.iOS编译错误

 Multiple commands produce 
'/Users/XXXX/Library/Developer/Xcode/DerivedData/YYYY- 
hbbiovvwitmvkrblqxqkthsyfong/Build/Products/Debug-iphoneos/YYYY.app':
1) Target 'YYYY' has create directory command with output 
'/Users/XXXX/Library/Developer/Xcode/DerivedData/Gallery- 
hbbiovvwitmvkrblqxqkthsyfong/Build/Products/Debug-iphoneos/YYYY.app'
2) That command depends on command in Target 'YYYYY': script phase “[CP] Copy Pods Resources”

解答文章https://www.jianshu.com/p/5d2d91f6df0e
报类似的错误需要去到tagets 里Build Phases下 [CP]copy pods Resources 删除Output files里的{UNLOCALIZED_RESOURCES_FOLDER_PATH}

删除以后再用Android Studio build一下,发现会提示你用命令flutter create .

记得恢复Runner以后把版本号写一下,不然你会有
The application's Info.plist does not contain CFBundleShortVersionString.这个错误

你可能感兴趣的:(Flutter 更新1.20版本遇到的坑)