Flutter 问题记录 -持续更新

716 阅读1分钟

1.Execution failed for task ':app:processDebugMainManifest'.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @438def51

* 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

BUILD FAILED in 25s
Exception: Gradle task assembleDebug failed with exit code 1

硬件环境:Mac M1
Flutter:1.22.6
Android Version: 11

解决办法: 用 Android Studio 打开 android 项目。点击菜单 File -> Project Structure -> Project. Android Gradle Plugin Version 修改为 3.5.0
Gradle Version 修改为 6.3.0

image.png

  1. No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

硬件环境:Mac M1
Flutter:1.22.6
Android Version: 11 解决办法: 用 Android Studio 打开 android 项目。点击菜单 File -> Project Structure -> Modules. NDK Version 修改为 22.1.7171670
Source Compatibility 修改为 1.8(JAVA8) Target Compatibility 修改为 1.8(JAVA8)

image.png