- flutter的sdk版本与第三方库使用的版本有差异
Compiler message:
../flutter/.pub-cache/hosted/pub.flutter-io.cn/extended_image-0.9.0/lib/src/gesture/extended_image_slide_page_route.dart:347:9:
Error: No named parameter with the name 'primaryRouteAnimation'.
primaryRouteAnimation: animation, ^^^^^^^^^^^^^^^^^^^^^
../flutter/packages/flutter/lib/src/cupertino/route.dart:430:3: Context: Found this candidate, but the arguments don't match.
CupertinoFullscreenDialogTransition({ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null build failed.
FAILURE: Build failed with an exception. * Where:
Script '/Users/edz/Documents/Git/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 780 * What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/edz/Documents/Git/flutter/bin/flutter'' finished with non-zero exit value 1
解决:查找相应的库(本例中为extended_image),去对应网站找相应的版本来导入。
- flutter一直停留在启动页面
Engine run configuration was invalid.
Could not launch engine with configuration.
解决:我发生这个问题是由于flutter版本降级后、flutter缓存和现有的版本不一致导致,清理重建并保证新的构建库被引入到工程中
1. flutter clean
2. flutter build ios --release #如果是debug环境的,可以使用:flutter build ios --debug
- Flutter当前资源与build缓存中的不匹配
Error 105 received from application: Isolate must be runnable
Hot reload received invalid response: {code: 105, message: Isolate must be runnable, data: {request: {method: _reloadSources, params: {pause: false, rootLibUri:
file:///Users/edz/Library/Developer/CoreSimulator/Devices/74C78E3B-0DEA-4D2B-8442-95F415EF0F14/data/Containers/Data/Application/8A1C31EC-7229-4B50-AE5F-88C223BCCF50/tmp/flutter_mixedAeuAuy/flutter_mixed/li
b/main.dart.incremental.dill, packagesUri:
file:///Users/edz/Library/Developer/CoreSimulator/Devices/74C78E3B-0DEA-4D2B-8442-95F415EF0F14/data/Containers/Data/Application/8A1C31EC-7229-4B50-AE5F-88C223BCCF50/tmp/flutter_mixedAeuAuy/flutter_mixed/.p
ackages, isolateId: isolates/3504661799683503}}, details: Isolate must be runnable before this request is made.}}
解决:删除build文件夹,重建
flutter build ios-framework
4.打包出现路径相关错误,找不到或已删除
/packages/flutter_tools/bin/xcode_backend.sh: No such file or directory
PhaseScriptExecution failed with a nonzero exit code
解决:修改配置选择,使得环境配置引用正确