Studio单独运行安卓模块代码报错
来源:12-8 基于自定义WebView实现H5混合开发-1【H5混合实战】
马俊宝
2022-04-14
在studio中 ,打开Flutter下 android 包 单独跑安卓代码 运行报错
Executing tasks: [:app:assembleDebug] in project /Users/yunhailan/flutterProject/flutter_travel/android
> Task :app:compileFlutterBuildDebug
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flutter_swiper
- package:flutter_page_indicator
- package:transformer_page_view
For solutions, see https://dart.dev/go/unsound-null-safety
> Task :app:compileFlutterBuildDebug FAILED
FAILURE: Build failed with an exception.
* Where:
Script '/Users/yunhailan/development/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/yunhailan/development/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 14s
1 actionable task: 1 executed
写回答
1回答
-
CrazyCodeBoy
2022-04-15
1.flutter_swiper不支持空安全可以改为flutter_swiper_null_safety: ^1.0.0
2.flutter_page_indicator与transformer_page_view还没有支持空安全的版本,需要移除后才能运行。00
相似问题