A common error for Flutter build apk

#### Causes:

Many plugins, like share_plus, connectivity_plus, etc., now need JDK 17. You get this type of error if you don’t have JDK 17.

#### Solutions:

Download JDK 17. Put any directory. (You can also add the path to the environment variable.)

Add the JDK path to your project gradle.properties. Like this:

`org.gradle.java.home=C://Program Files//Java//jdk-17`

That’s all.

--

--

Ratul Hasan Ruhan
Ratul Hasan Ruhan

Written by Ratul Hasan Ruhan

Turning Code into Mobile Marvels ✨

No responses yet