Lezzxy
Lezzxy

Reputation: 43

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

Upvotes: 4

Views: 9146

Answers (1)

CodeRider
CodeRider

Reputation: 582

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.

Upvotes: 10

Related Questions