2022년 5월 28일 토요일

Flutter JDK Error with MacOS Big Sur

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':path_provider:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

* 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 1m 1s
Exception: Gradle task assembleDebug failed with exit code 1

I use MacBook with Catalina OS. and never update OS.
But one day, it was suddenly updated to BigSur.
what!? I Actually did't check Update.

And I updated Android Studio, but the Project did not run.

so I Open the Terminal and Find Java Location.

tools.jar copied and pasted it there. That's all.

But why was the MacBook operating system updated?


/usr/libexec/java_home -V | grep jdk

    1.8.261.12 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_261 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_261.jdk/Contents/Home

Copied tools.jar from "Java SE 8" Path Lib, and Pasted to "Java" Path Lib

댓글 없음:

댓글 쓰기

플러터 단축키

1. 위젯 감싸기/벗기기 비주얼 스튜디오 :   Cmd + . 안드로이드 스튜디오 : Alt + Enter 2. 코드 정렬 비주얼 스튜디오 : Ctrl + S 안드로이드 스튜디오 : Ctlr + Alt + L 3. StatelessWidget ->...