Flutter旧代码升级或从gitee/github下载的代码执行flutter pub get时经常会出现下面的问题,这里记录下解决办法。
问题:
The plugins `permission_handler, shared_preferences` use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
解决办法:
flutter pub upgrade --major-versions