Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: kotlin could not find the required jdk tools in the java installation

I have some problem in flutter. When I run

flutter run -v

I got some error:

kotlin could not find the required jdk tools in the java installation 'c:\android\openjdk' used by gradle make sure gradle is running on a jdk, not jre

like image 380
Lezzxy Avatar asked Dec 31 '22 11:12

Lezzxy


1 Answers

Problem statement = No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Solution

Please set the Environment variable like below to solve the issue

Variable name : JAVA_HOME

Variable Value : C:\Program Files\Java\jdk1.8.0_202

Note : If you do not have jdk then download it and make sure you make the appropriate changes in the version wherever applicable.

like image 193
CodeRider Avatar answered Jan 13 '23 12:01

CodeRider