1、搭建Flutter 安卓运行环境时,遇到下面这个问题:
Error message:
A problem was found with the configuration of task ‘:app:processDebugResources’. > File ‘C:UsersuserAppDataLocalAndroidsdkplatformsandroid-28android.jar’ specified for property ‘androidJar’ does not exist.
解决:
确认安卓SDK已安装的前提下,按以下步骤操作:
去到 UsersuserAppDataLocalAndroidsdkplatformsandroid-29,然后将
android.jar file 拷贝到 android-28 目录上。重新运行即可。
2、运行Flutter 项目,遇到下面这个问题:
** BUILD FAILED **
Xcode’s output:
↳
Writing result bundle at path:
/var/folders/4w/vyrtq4g54p16r733bx9cr79r0000gn/T/flutter_tools.4cs7Wl/flutter_ios_build_temp_dirwm3X6w/temporary_xcresult_bundle
Error: Cannot run with sound null safety, because the following dependencies
don’t support null safety:
package:english_words
For solutions, see https://dart.dev/go/unsound-null-safety
Failed to package /Users/pilipala/Documents/FlutterProjects/day01.
Command PhaseScriptExecution failed with a nonzero exit code
解决:
使用命令,在运行的时候添加参数,如下所示:
flutter run –no-sound-null-safety
即可,如下图所示:
【信息由网络或者个人提供,如有涉及版权请联系COOY资源网邮箱处理】
暂无评论内容