{"id":1630,"date":"2022-01-12T23:14:53","date_gmt":"2022-01-12T16:14:53","guid":{"rendered":"https:\/\/anhduc.org\/?p=1630"},"modified":"2025-11-01T19:57:51","modified_gmt":"2025-11-01T12:57:51","slug":"flutter-bai-1-thiet-lap-moi-truong-lam-viec","status":"publish","type":"post","link":"https:\/\/anhduc.org\/?p=1630","title":{"rendered":"Flutter B\u00e0i 1 &#8211; Thi\u1ebft l\u1eadp m\u00f4i tr\u01b0\u1eddng l\u00e0m vi\u1ec7c"},"content":{"rendered":"<h2><span style=\"font-size: 14pt;\"><strong><span style=\"font-family: arial, helvetica, sans-serif;\">Y\u00eau c\u1ea7u h\u1ec7 th\u1ed1ng<\/span><\/strong><\/span><\/h2>\n<p>\u0110\u1ec3 c\u00e0i \u0111\u1eb7t v\u00e0 ch\u1ea1y Flutter, m\u00f4i tr\u01b0\u1eddng ph\u00e1t tri\u1ec3n c\u1ee7a b\u1ea1n ph\u1ea3i \u0111\u00e1p \u1ee9ng c\u00e1c y\u00eau c\u1ea7u t\u1ed1i thi\u1ec3u sau:<\/p>\n<p>H\u1ec7 \u0111i\u1ec1u h\u00e0nh: Windows 7 SP1 tr\u1edf l\u00ean (64-bit),<br \/>\n\u1ed4 c\u1ee9ng: 1,64 GB (ch\u01b0a bao g\u1ed3m dung l\u01b0\u1ee3ng \u0111\u0129a cho IDE \/Tool).<br \/>\nWindows PowerShell 5.0 ho\u1eb7c m\u1edbi h\u01a1n (\u0111\u00e3 \u0111\u01b0\u1ee3c c\u00e0i \u0111\u1eb7t s\u1eb5n tr\u00ean Windows 10)<br \/>\nGit cho Windows 2.x, v\u1edbi t\u00f9y ch\u1ecdn S\u1eed d\u1ee5ng Git t\u1eeb Windows Command Prompt.<\/p>\n<h2><strong><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14pt;\">T\u1ea3i Flutter SDK<\/span><\/strong><\/h2>\n<p>1. T\u1ea3i Flutter SDK b\u1ea3n m\u1edbi nh\u1ea5t t\u1ea1i <a href=\"https:\/\/docs.flutter.dev\/get-started\/install\/windows\">\u0111\u00e2y. <\/a>SDK s\u1eed d\u1ee5ng trong c\u00e1c b\u00e0i vi\u1ebft d\u01b0\u1edbi \u0111\u00e2y l\u00e0 b\u1ea3n 2.8.1<\/p>\n<p>2. Gi\u1ea3i n\u00e9n Flutter SDK t\u1ea3i v\u1ec1 v\u00e0copy folder Flutter v\u00e0o\u00a0 C: \\ Users \\ &lt;your-user-name&gt; \\ Documents<\/p>\n<blockquote><p><span style=\"font-size: 12pt;\">Ch\u00fa \u00fd: Kh\u00f4ng copy Flutter v\u00e0o\u00a0 C: \\ Program Files \\<\/span><\/p><\/blockquote>\n<p>Ho\u1eb7c c\u00f3 th\u1ec3 d\u00f9ng l\u1ec7nh sau \u0111\u1ec3 c\u00e0i \u0111\u1eb7t t\u1ef1 \u0111\u1ed9ng b\u1ea3n \u1ed5n \u0111\u1ecbnh m\u1edbi nh\u1ea5t<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">git clone https:\/\/github.com\/flutter\/flutter.git -b stable<\/code><\/p>\n<h2><strong><span style=\"font-size: 14pt; font-family: arial, helvetica, sans-serif;\">C\u1eadp nh\u1eadt PATH<\/span><\/strong><\/h2>\n<p>B\u01b0\u1edbc ti\u1ebfp theo l\u00e0 th\u00eam Path v\u00e0o Windows Environment<\/p>\n<ul>\n<li>Nh\u1eadp \u2018env\u2019 v\u00e0o thanh t\u00ecm ki\u1ebfm tr\u00ean windows v\u00e0 ch\u1ecdn Environment Variables trong b\u1ea3ng \u0111i\u1ec1u khi\u1ec3n<\/li>\n<li>Trong \u00f4 User Variables nh\u1ea5p \u0111\u00fap v\u00e0o d\u00f2ng PATH, th\u00eam \u0111\u01b0\u1eddng d\u1eabn \u0111\u1ebfn th\u01b0 m\u1ee5c flutter\\bin sau d\u1ea5u ;<\/li>\n<\/ul>\n<p>Sau \u0111\u00f3 \u0111\u00f3ng v\u00e0 m\u1edf l\u1ea1i m\u1ecdi c\u1eeda s\u1ed5 CMD hi\u1ec7n c\u00f3 \u0111\u1ec3 thay \u0111\u1ed5i n\u00e0y c\u00f3 hi\u1ec7u l\u1ef1c.<\/p>\n<h2><strong><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14pt;\">C\u00e0i \u0111\u1eb7t Android Studio<\/span><\/strong><\/h2>\n<p>T\u1ea3i xu\u1ed1ng v\u00e0 c\u00e0i \u0111\u1eb7t <a href=\"https:\/\/developer.android.com\/studio\" target=\"_blank\" rel=\"noopener\">Android Studio<\/a>.<br \/>\nFlutter y\u00eau c\u1ea7u c\u00f3 SDK Android m\u1edbi nh\u1ea5t, Android SDK Command-line Tools v\u00e0 Android SDK Build-Tools khi ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng cho Android.<\/p>\n<h2><strong><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14pt;\">T\u1ea1o m\u00e1y \u1ea3o<\/span><\/strong><\/h2>\n<p>M\u1edf Android Studio, nh\u1ea5n v\u00e0o AVD Manager icon v\u00e0 ch\u1ecdn Create Virtual Device ho\u1eb7c v\u00e0o Configure &gt; AVD Manager &gt; Create Virtual Device<\/p>\n<h2><strong><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14pt;\">Ki\u1ec3m tra c\u00e0i \u0111\u1eb7t<\/span><\/strong><\/h2>\n<p>M\u1edf Terminal nh\u1eadp l\u1ec7nh <strong>flutter doctor,\u00a0<\/strong>n\u1ebfu k\u1ebft qu\u1ea3 tr\u1ea3 v\u1ec1 nh\u01b0 d\u01b0\u1edbi l\u00e0 ok<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">flutter doctor\r\nDoctor summary (to see all details, run flutter doctor -v):\r\n[\u221a] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19043.1415], locale vi-VN)\r\n[\u221a] Android toolchain - develop for Android devices (Android SDK version 32.0.0)\r\n[\u221a] Chrome - develop for the web\r\n[\u221a] Android Studio (version 2020.3)\r\n[\u221a] Connected device (2 available)<\/pre>\n<h2><strong><span style=\"font-family: arial, helvetica, sans-serif; font-size: 14pt;\">C\u00e1c l\u1ed7i th\u01b0\u1eddng g\u1eb7p<\/span><\/strong><\/h2>\n<p>1. Kh\u00f4ng t\u00ecm th\u1ea5y th\u01b0 m\u1ee5c c\u00e0i \u0111\u1eb7t Android Studio<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[!] Android Studio\r\n    X android-studio-dir = C:\\Program\r\n    X Android Studio not found at C:\\Program<\/pre>\n<p>S\u1eed d\u1ee5ng l\u1ec7nh sau \u0111\u1ec3 s\u1eeda:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">flutter config --android-studio-dir \"C:\\Program Files\\Android\\Android Studio\"<\/pre>\n<p>2. Ch\u01b0a c\u00e0i \u0111\u1eb7t Android SDK Command-line tools<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)\r\n    X cmdline-tools component is missing\r\n      Run `path\/to\/sdkmanager --install \"cmdline-tools;latest\"`\r\n      See https:\/\/developer.android.com\/studio\/command-line for more details.\r\n    X Android license status unknown.\r\n      Run `flutter doctor --android-licenses` to accept the SDK licenses.\r\n      See https:\/\/flutter.dev\/docs\/get-started\/install\/windows#android-setup for more details.<\/pre>\n<p>V\u00e0o Android Studio &gt; Tools &gt; Android SDK Manager &gt; SDK Tools nh\u1eafn ch\u1ecdn Android SDK Command-line tools \u0111\u1ec3 c\u00e0i \u0111\u1eb7t<\/p>\n<p>3. B\u1ea1n c\u00f3 th\u1ec3 b\u1ecb y\u00eau c\u1ea7u \u0111\u1ed3ng \u00fd Android Licenses, s\u1eed d\u1ee5ng l\u1ec7nh sau<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">flutter doctor --android-licenses<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Y\u00eau c\u1ea7u h\u1ec7 th\u1ed1ng \u0110\u1ec3 c\u00e0i \u0111\u1eb7t v\u00e0 ch\u1ea1y Flutter, m\u00f4i tr\u01b0\u1eddng ph\u00e1t tri\u1ec3n c\u1ee7a b\u1ea1n ph\u1ea3i \u0111\u00e1p \u1ee9ng c\u00e1c y\u00eau c\u1ea7u t\u1ed1i thi\u1ec3u sau: H\u1ec7 \u0111i\u1ec1u h\u00e0nh: Windows 7 SP1 tr\u1edf l\u00ean (64-bit), \u1ed4 c\u1ee9ng: 1,64 GB (ch\u01b0a bao g\u1ed3m dung l\u01b0\u1ee3ng \u0111\u0129a cho IDE \/Tool). Windows PowerShell 5.0 ho\u1eb7c m\u1edbi h\u01a1n (\u0111\u00e3 \u0111\u01b0\u1ee3c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jnews-multi-image_gallery":[],"jnews_single_post":[],"jnews_primary_category":[],"jnews_social_meta":[],"jnews_override_counter":[],"footnotes":""},"categories":[],"tags":[],"class_list":["post-1630","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/anhduc.org\/index.php?rest_route=\/wp\/v2\/posts\/1630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anhduc.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anhduc.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anhduc.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anhduc.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1630"}],"version-history":[{"count":4,"href":"https:\/\/anhduc.org\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions"}],"predecessor-version":[{"id":1681,"href":"https:\/\/anhduc.org\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions\/1681"}],"wp:attachment":[{"href":"https:\/\/anhduc.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anhduc.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anhduc.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}