{"id":242,"date":"2021-09-17T01:29:20","date_gmt":"2021-09-17T05:29:20","guid":{"rendered":"https:\/\/notebook.chaopricha.com\/?p=242"},"modified":"2021-09-17T01:29:37","modified_gmt":"2021-09-17T05:29:37","slug":"flutter-install-issue-fixing-exception-in-thread-main-java-lang-noclassdeffounderror","status":"publish","type":"post","link":"https:\/\/notebook.chaopricha.com\/?p=242","title":{"rendered":"Flutter Install Issue On Windows 10: Fixing Exception in thread &#8220;main&#8221; java.lang.NoClassDefFoundError: &#8230;"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-2 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"389\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-6.png\" alt=\"\" class=\"wp-image-249\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-6.png 789w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-6-300x148.png 300w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-6-768x379.png 768w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-6-500x247.png 500w\" sizes=\"(max-width: 789px) 100vw, 789px\" \/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"389\" height=\"192\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-7.png\" alt=\"\" class=\"wp-image-250\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-7.png 389w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-7-300x148.png 300w\" sizes=\"(max-width: 389px) 100vw, 389px\" \/><\/a><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p>After installing Flutter and Android Studio on Windows, you run the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flutter doctor<\/code><\/pre>\n\n\n\n<p>A common problem you might encounter after installing Android Studio is that Android Studio is not found.  This is fixed by setting the Android Studio Directory with this command (assuming the default install path):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flutter config --android-studio-dir=\"C:\\Program Files\\Android\\Android Studio\"<\/code><\/pre>\n\n\n\n<p>Afterward, you might be asked to accept the Android license.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"198\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image.png\" alt=\"\" class=\"wp-image-243\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image.png 828w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-300x72.png 300w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-768x184.png 768w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-500x120.png 500w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/a><\/figure>\n\n\n\n<p>You can do so with this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flutter doctor --android-licenses<\/code><\/pre>\n\n\n\n<p>What you will now encounter after running the license acceptance would be the exception error.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"178\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-1.png\" alt=\"\" class=\"wp-image-244\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-1.png 828w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-1-300x64.png 300w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-1-768x165.png 768w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-1-500x107.png 500w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/a><figcaption>To fix this, launch Android Studio,  select Projects and the More Actions.  Pick SDK Manager from the drop down list.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"629\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-2.png\" alt=\"\" class=\"wp-image-245\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-2.png 802w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-2-300x235.png 300w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-2-768x602.png 768w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-2-383x300.png 383w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/a><\/figure>\n\n\n\n<p>Choose the SDK Tools tab and check the &#8220;Android SDK Command-line Tools (latest)&#8221;.  Click OK.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"703\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-3.png\" alt=\"\" class=\"wp-image-246\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-3.png 984w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-3-300x214.png 300w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-3-768x549.png 768w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-3-420x300.png 420w\" sizes=\"(max-width: 984px) 100vw, 984px\" \/><\/a><\/figure>\n\n\n\n<p>Run flutter doctor command again and now everything should be good.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"791\" height=\"202\" src=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-4.png\" alt=\"\" class=\"wp-image-247\" srcset=\"https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-4.png 791w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-4-300x77.png 300w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-4-768x196.png 768w, https:\/\/notebook.chaopricha.com\/wp-content\/uploads\/2021\/09\/image-4-500x128.png 500w\" sizes=\"(max-width: 791px) 100vw, 791px\" \/><\/a><\/figure>\n\n\n\n<p>Enjoy Flutter!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After installing Flutter and Android Studio on Windows, you run the following command: A common problem you might encounter after installing Android Studio is that Android Studio is not found. This is fixed by setting the Android Studio Directory with &hellip; <a href=\"https:\/\/notebook.chaopricha.com\/?p=242\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=\/wp\/v2\/posts\/242"}],"collection":[{"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=242"}],"version-history":[{"count":2,"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions"}],"predecessor-version":[{"id":252,"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions\/252"}],"wp:attachment":[{"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notebook.chaopricha.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}