#
Java 11 to run Error

Hi, 

When i try to run the project i have the error below. What i tried:

* Install Java 11

* Change the JAVA_HOME path

* When i write java -version it is 11

* When i write flutter doctor -v it seems  1.8

* In android studio -> settings -> build, execution, depoloyment -> Gradle (I can not see the gradle projects part)

* So i can not solve it.


The ERROR:

Launching lib\main.dart on AOSP on IA Emulator in debug mode...

Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* Where:

Build file 'C:\srcFlutter\MainFile_SourceCode\prokit_flutter\prokit_flutter\android\app\build.gradle' line: 14

* What went wrong:

A problem occurred evaluating project ':app'.

> Failed to apply plugin 'com.android.internal.application'.

   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

     You can try some of the following options:

       - changing the IDE settings.

       - changing the JAVA_HOME environment variable.

       - changing `org.gradle.java.home` in `gradle.properties`.

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BU�LD FAILED in 1s

Exception: Gradle task assembleDebug failed with exit code 1

Asked 5 days ago on September 14, 2021 5:10 PM Comments 1 times


  1. Generic placeholder image

    Rohan replied

    Hello Yavuz Burak Güzel,

    Please follow this link for resolving the java 11 issue.

    Thank you.

Recent Tickets
erro doctor - Select Clin... 6 months ago on February 22, 2021 8:25 PM NotePlus change default v... 7 months ago on February 19, 2021 10:02 PM [ERROR] Failed to import ... 1 year ago on August 22, 2020 7:19 AM woo iqonic plugin - 403 e... 16 hours ago on September 19, 2021 9:55 AM dark mode not working on ... 19 hours ago on September 19, 2021 7:24 AM Design Files 2 days ago on September 17, 2021 5:57 PM Walkthrough description t... 2 days ago on September 17, 2021 8:07 AM Java 11 to run Error... 5 days ago on September 14, 2021 5:10 PM Problem with mobily frie... 6 days ago on September 13, 2021 6:27 PM I can't "npm run dev"... 6 days ago on September 13, 2021 2:14 PM