Help Needed: Preserving org.gradle.java.home Setting in gradle.properties

Troubleshooting

Hi everyone,

I hope you're doing well.

I'm encountering an issue with my FlutterFlow project where I need to force Gradle to use JDK 17 by adding the following line in my gradle.properties file:

org.gradle.java.home=/path/to/jdk-17

However, every time I build my project, this line gets removed or overwritten automatically. In a previous project, I was able to add this line and it was preserved, but in my current project it is not.

Has anyone experienced a similar issue or have any suggestions on how to prevent FlutterFlow (or its build system) from deleting this configuration? Any insights or workarounds would be greatly appreciated.

Thank you in advance for your help!

Fabio

What have you tried so far?

Here’s what I've tried so far:

  1. Setting the Environment Variable:
    I ensured that my system’s JAVA_HOME environment variable is correctly set to the JDK 17 installation path. Running java -version confirms that the JDK 17 version is active.

  2. Editing gradle.properties:
    I manually edited the gradle.properties file located in the android directory of my project to add the required line.

Did you check FlutterFlow's Documentation for this topic?
No
1