所以基本上当我在 codemagic 中运行我的项目时,它会使用你的包从 windows 的路径,它会导致这个错误。
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\\Users\\thech\\Downloads\\nueva_temporada-20210514T040146Z-001\\nueva_temporada\\build\\app\\intermediates\\flutter\\debug\\flutter_assets\\AssetManifest.json
所以我正在研究 Visual Studio Code。我将所有内容推送到 GitHub 的新分支中,然后我将在分支中提交的内容用于 codemagic。它在 VS Code 中运行良好,但在 codemagic 中却不行,因为 Codemagic 使用 MacOS 或 Linux。要解决这个问题,您需要使用Flutter Clean,但我无法在 Codemagic 中运行这样的命令。
完整日志:
== Building for Android ==
> flutter build apk --debug
Building without sound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\\Users\\thech\\Downloads\\nueva_temporada-20210514T040146Z-001\\nueva_temporada\\build\\app\\intermediates\\flutter\\debug\\flutter_assets\\AssetManifest.json
* 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 30s
Running Gradle task 'assembleDebug'... 32.5s
Gradle task assembleDebug failed with exit code 1
Build failed :|
Failed to build for Android
Building iOS