Bad*_*chi 4 android-studio flutter
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Android\android studio\jre\bin\java.exe
* 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
Exception: Gradle task assembleDebug failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
Android Studio版本:
Android Studio 电鳗 | 2022.1.1 Canary 9 Build #AI-221.5921.22.2211.8881706,构建于2022年7月29日运行时版本:11.0.13+0-b1751.21-8125866 amd64 VM:JetBrains sro的OpenJDK 64位服务器VM
Android Studio 电鳗之后 | 2022.1.1更新,JAVA_HOME路径发生变化jre->jbr。因此,您应该更新.zshrc文件。
从航站楼出发,
open ~/.zshrc并更新路径export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
| 归档时间: |
|
| 查看次数: |
1826 次 |
| 最近记录: |