[RESOLVED] Gradle/Java compatibility error?

Troubleshooting

Unable to run on android device nor emulator ?

What have you tried so far?

RESOLVED :

ON WINDOWS :

  • you can keep the latest version of android studio , but you have to downgrade your java version to JDK 17
    Download https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-17

  • replace files in Java binary at: C:\Program Files\Android\Android Studio\jbr

  • delete all files in jbr folder and replace them with the ones from JDK 17

  • run flutter doctor -v

  • make sure of the versions , reopen FF and now you can run your project

ON MACOS : Thanks to matchia


Install Java 17 via brew

  1. brew install openjdk@17

  2. Create a symbolic link for the Java 17

  3. sudo ln -sfn /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-17.jdk

  4. Add path to the symbolic link (I am using zsh, change to ~/.bashrc if you use bash)

  5. echo 'export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"' >> ~/.zshrc

  6. source ~/.zshrc

  7. Configure Flutter to use the install Java 17

  8. flutter config --jdk-dir /opt/homebrew/opt/openjdk@17

  9. Restart Terminal and Android Studio

  10. Run you AVD

  11. flutter run

Did you check FlutterFlow's Documentation for this topic?
Yes
7
5 replies