{"id":461,"date":"2023-05-10T17:57:11","date_gmt":"2023-05-10T17:57:11","guid":{"rendered":"https:\/\/sidroniolima.com.br\/blog\/?p=461"},"modified":"2023-05-10T17:57:14","modified_gmt":"2023-05-10T17:57:14","slug":"java-11-sdk-vscode-flutter-issue","status":"publish","type":"post","link":"https:\/\/sidroniolima.com.br\/blog\/2023\/05\/10\/java-11-sdk-vscode-flutter-issue\/","title":{"rendered":"Java 11 SDK VsCode Flutter issue"},"content":{"rendered":"\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=sidroniolima\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n\n<p>To set a different SDK to a project, add the following property to gradle.properties file:<\/p>\n<p>org.gradle.java.home=\/usr\/lib\/jvm\/java-11-openjdk-amd64\/\u00a0 <\/p>\n\n\n\n<p>Other approach, that didn&#8217;t work for me is include the following property to the settings.json (Ctrl + P):<\/p>\n<div>\n<div>&#8220;java.configuration.runtimes&#8221;: [<\/div>\n<div>{<\/div>\n<div>&#8220;name&#8221;: &#8220;JavaSE-1.8&#8221;,<\/div>\n<div>&#8220;path&#8221;: &#8220;\/usr\/lib\/jvm\/java-8-openjdk-amd64\/jre\/&#8221;<\/div>\n<div>},<\/div>\n<div>{<\/div>\n<div>&#8220;name&#8221;: &#8220;JavaSE-11&#8221;,<\/div>\n<div>&#8220;path&#8221;: &#8220;\/usr\/lib\/jvm\/java-11-openjdk-amd64\/&#8221;,<\/div>\n<div>&#8220;default&#8221;: true<\/div>\n<div>}<\/div>\n<div>]<\/div>\n<\/div>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=sidroniolima\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>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\/\u00a0 Other approach, that didn&#8217;t work for me is include the following property to the settings.json (Ctrl + P): &#8220;java.configuration.runtimes&#8221;: [ { &#8220;name&#8221;: &#8220;JavaSE-1.8&#8221;, &#8220;path&#8221;: &#8220;\/usr\/lib\/jvm\/java-8-openjdk-amd64\/jre\/&#8221; }, { &#8220;name&#8221;: &#8220;JavaSE-11&#8221;, &#8220;path&#8221;: &#8220;\/usr\/lib\/jvm\/java-11-openjdk-amd64\/&#8221;, &#8220;default&#8221;: true } ]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/comments?post=461"}],"version-history":[{"count":1,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":462,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/posts\/461\/revisions\/462"}],"wp:attachment":[{"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/media?parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/categories?post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sidroniolima.com.br\/blog\/wp-json\/wp\/v2\/tags?post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}