Flutter Error: Android X migration : Could not determine java version from '11.0.8'.
해당 프로젝트 폴더에 android 폴더에서
터미널을 가서 ./gradlew --version 를 칩니다.
그러면 아래와 같은 화면이 뜰 것입니다.
Gradle 4.1
------------------------------------------------------------
Build time: 2017-08-07 14:38:48 UTC
Revision: 941559e020f6c357ebb08d5c67acdb858a3defc2
Groovy: 2.4.11
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_301 (Oracle Corporation 25.301-b09)
OS: Mac OS X 10.16 x86_64
그러면 동일하게
gradle wrapper --gradle-version=5.1.1
치면 migrate가 되는 것을 볼 수 있습니다.
gradle: command not found 가 뜬다면
Terminal에서 brew install gradle 을 해줍니다.
만약 아래와 같은 에러가 뜬다면
Executing Gradle tasks as part of a build without a settings file is not supported. Make sure that you are executing Gradle from a directory within your Gradle project. Your project should have a 'settings.gradle(.kts)' file in the root directory.