Java 11 SDK VsCode Flutter issue

To set a different SDK to a project, add the following property to gradle.properties file:

org.gradle.java.home=/usr/lib/jvm/java-11-openjdk-amd64/ 

Other approach, that didn’t work for me is include the following property to the settings.json (Ctrl + P):

“java.configuration.runtimes”: [
{
“name”: “JavaSE-1.8”,
“path”: “/usr/lib/jvm/java-8-openjdk-amd64/jre/”
},
{
“name”: “JavaSE-11”,
“path”: “/usr/lib/jvm/java-11-openjdk-amd64/”,
“default”: true
}
]

Leave a Reply

Your email address will not be published. Required fields are marked *