<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flutter | アリッシアの朝</title>
	<atom:link href="https://alicia-ing.com/category/programming/flutter/feed/" rel="self" type="application/rss+xml" />
	<link>https://alicia-ing.com</link>
	<description></description>
	<lastBuildDate>Mon, 11 Aug 2025 12:07:16 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://alicia-ing.com/wp-content/uploads/2023/05/cropped-alicia-32x32.webp</url>
	<title>Flutter | アリッシアの朝</title>
	<link>https://alicia-ing.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>【Flutter】画面を構成するScaffoldウィジェット一覧</title>
		<link>https://alicia-ing.com/programming/flutter/scaffold/</link>
					<comments>https://alicia-ing.com/programming/flutter/scaffold/#respond</comments>
		
		<dc:creator><![CDATA[アリッシア]]></dc:creator>
		<pubDate>Tue, 14 Nov 2023 22:30:16 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://alicia-ing.com/?p=4450</guid>

					<description><![CDATA[Scaffoldは、Flutterで作るアプリケーションの中で最も使用されるウィジェット（Widget）の一つです。Scaffoldなしでは、Flutterは全く使えないといえるでしょう。 本記事では、Scaffoldの [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Scaffoldは、Flutterで作るアプリケーションの中で<strong>最も使用されるウィジェット（Widget）の一つ</strong>です。<br>Scaffoldなしでは、<strong>Flutterは全く使えない</strong>といえるでしょう。</p>



<p>本記事では、Scaffoldの各プロパティについて紹介し、どんな時に使用するか解説します。</p>



<div class="wp-block-cocoon-blocks-blank-box-1 blank-box block-box has-border-color has-blue-border-color">
<div class="wp-block-cocoon-blocks-icon-box common-icon-box block-box alert-box">
<p>本記事は、<strong>FlutterのインストールとVScodeの拡張機能のインストールは完了していることを想定</strong>しています。</p>



<p>未完了の場合は、以下の記事を合わせて読んでください。</p>
</div>



<p>Flutterの開発を進めるには、<strong>FlutterのパッケージをPCにインストール</strong>する必要があります。<br>さらに、VScodeの拡張機能を使えば、時短して開発できます。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>FlutterでVScodeの環境設定を解説</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/vscode-setting/" title="【Flutter】VSCodeでWindowsの開発を環境構築" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】VSCodeでWindowsの開発を環境構築</div><div class="blogcard-snippet internal-blogcard-snippet">Windowsを使ってflutterでvscodeの環境構築を解説をしています。アプリの開発はOSごとに使用できる言語が異なりますが、Flutterはどちらも対応していて、企業の参入もしています。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2024.11.05</div></div></div></div></a>
</div>
</div>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-check"><span class="label-box-label-text block-box-label-text box-label-text">本記事は次の人におすすめ</span></div><div class="label-box-content block-box-content box-content">
<ul class="wp-block-list">
<li>Flutterでアプリを作りたい。</li>



<li>Scaffoldの使い方を知りたい。</li>
</ul>
</div></div>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>



<h2 class="wp-block-heading">Scaffold</h2>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/11/ScaffoldWiget.webp" alt="" class="wp-image-4630" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/ScaffoldWiget.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/11/ScaffoldWiget-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/ScaffoldWiget-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/ScaffoldWiget-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/ScaffoldWiget-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p>FlutterのScaffoldは、<strong>アプリケーションの基本的な構造やレイアウトを提供するウィジェット</strong>です。Scaffoldウィジェットは、<strong>通常アプリの標準的な画面構造を定義</strong>します。</p>



<p>Scaffoldにはいくつか主要な要素があり、<strong>管理できるUI部品は、VScodeで確認</strong>できます。<br>コードエディタ上でマウスカーソルを合わせて、<strong>「Ctrl」を押しながらクリック</strong>してください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/property-1.gif" alt="" class="wp-image-4636"/></figure>



<p>「Scaffold.dart」が開かれて、使用できるプロパティーが表示されます。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-dart" data-lang="Dart"><code>class Scaffold extends StatefulWidget {
  /// Creates a visual scaffold for Material Design widgets.
  const Scaffold({
    super.key,
    this.appBar,
    this.body,
    this.floatingActionButton,
    this.floatingActionButtonLocation,
    this.floatingActionButtonAnimator,
    this.persistentFooterButtons,
    this.persistentFooterAlignment = AlignmentDirectional.centerEnd,
    this.drawer,
    this.onDrawerChanged,
    this.endDrawer,
    this.onEndDrawerChanged,
    this.bottomNavigationBar,
    this.bottomSheet,
    this.backgroundColor,
    this.resizeToAvoidBottomInset,
    this.primary = true,
    this.drawerDragStartBehavior = DragStartBehavior.start,
    this.extendBody = false,
    this.extendBodyBehindAppBar = false,
    this.drawerScrimColor,
    this.drawerEdgeDragWidth,
    this.drawerEnableOpenDragGesture = true,
    this.endDrawerEnableOpenDragGesture = true,
    this.restorationId,
  });
}</code></pre></div>



<p>これらのマテリアルを使用してアプリを作成していきます。</p>



<p>本記事では、アプリケーションバー・画面本体・ボトムバーなどの<strong>画面構成部品</strong>とボタンやドロワーなどの<strong>UI部品</strong>に分けて紹介をします。</p>



<h3 class="wp-block-heading">key</h3>



<p>keyは、公式ページが述べているように、<br><strong>同じ型のウィジェットが複数ある</strong>場合、区別するために使用するものです。</p>



<p>扱いが難しいので、<strong>複雑なアプリケーションを作らない場合は、無視しても大丈夫</strong>です。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>A&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/foundation/Key-class.html">Key</a>&nbsp;is an identifier for&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/Widget-class.html">Widget</a>s,&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/Element-class.html">Element</a>s and&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/semantics/SemanticsNode-class.html">SemanticsNode</a>s.</p>



<p>A new widget will only be used to update an existing element if its key is the same as the key of the current widget associated with the element.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/foundation/Key-class.html">Key class &#8211; foundation library &#8211; Dart API</a></cite></blockquote>



<h3 class="wp-block-heading">appBar</h3>



<p>appBarは、<strong>スクリーンの上部に表示するアプリケーションバーを定義するプロパティ</strong>です。<br>スクロールできるアプリバーを作成する場合は、&nbsp;SliverAppBarを使用します。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>App bars are typically used in the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/appBar.html">Scaffold.appBar</a>&nbsp;property, which places the app bar as a fixed-height widget at the top of the screen. For a scrollable app bar, see&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/SliverAppBar-class.html">SliverAppBar</a>, which embeds an&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/AppBar-class.html">AppBar</a>&nbsp;in a sliver for use in a&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/CustomScrollView-class.html">CustomScrollView</a>.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/AppBar-class.html">AppBar class &#8211; material library &#8211; Dart API</a></cite></blockquote>



<h3 class="wp-block-heading">body</h3>



<p>アプリケーションバー(appBar)とボトムバー(bottomNavigationBar)の間に配置される要素ー要するに、<strong>アプリの本体となり情報の提供や操作をする場所</strong>になります。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>The widget in the body of the scaffold is positioned at the top-left of the available space between the app bar and the bottom of the scaffold. To center this widget instead, consider putting it in a&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/Center-class.html">Center</a>&nbsp;widget and having that be the body. To expand this widget instead, consider putting it in a&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/SizedBox/SizedBox.expand.html">SizedBox.expand</a>.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/body.html">body property &#8211; Scaffold class &#8211; material library &#8211; Dart API</a></cite></blockquote>



<h3 class="wp-block-heading">floatingActionButton</h3>



<p><strong>画面上に円形のボタンとして配置</strong>されます。<br>1画面に1つだけ使用されて、作成や共有、ナビゲーションなどのアプリケーションの主要な動作を促進します。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>A floating action button is a circular icon button that hovers over content to promote a primary action in the application. Floating action buttons are mo０st commonly used in the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/floatingActionButton.html">Scaffold.floatingActionButton</a>&nbsp;field.</p>



<p>Use at most a single floating action button per screen. Floating action buttons should be used for positive actions such as &#8220;create&#8221;, &#8220;share&#8221;, or &#8220;navigate&#8221;. (If more than one floating action button is used within a&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/Route-class.html">Route</a>, then make sure that each button has a unique&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/FloatingActionButton/heroTag.html">heroTag</a>, otherwise an exception will be thrown.)</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/FloatingActionButton-class.html">FloatingActionButton class &#8211; material library &#8211; Dart API</a></cite></blockquote>



<p>floatingActionButtonを使用すると、<strong>画面の右下にボタンが配置</strong>されます。このボタンを中央に配置、<strong>ボトムバーと重ねる</strong>には、「floatingActionButtonLocation」を使用します。</p>



<p>floatingActionButtonAnimatorは、<strong>ボタンにアニメーションを制御する</strong>プロパティです。</p>



<h3 class="wp-block-heading">persistentFooterButtons</h3>



<p><strong>bodyプロパティの下に複数のボタンを配置</strong>できます。<br>また、bodyをスクロールしても、これらのボタンは、画面上に保持されます。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>A set of buttons that are displayed at the bottom of the scaffold.</p>



<p>Typically this is a list of&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/TextButton-class.html">TextButton</a>&nbsp;widgets. These buttons are persistently visible, even if the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/body.html">body</a>&nbsp;of the scaffold scrolls.</p>



<p>These widgets will be wrapped in an&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/widgets/OverflowBar-class.html">OverflowBar</a>.</p>



<p>The&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/persistentFooterButtons.html">persistentFooterButtons</a>&nbsp;are rendered above the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/bottomNavigationBar.html">bottomNavigationBar</a>&nbsp;but below the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/body.html">body</a>.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/persistentFooterButtons.html">persistentFooterButtons property &#8211; Scaffold class</a></cite></blockquote>



<h3 class="wp-block-heading">drawer</h3>



<p>アイコンボタン（ハンバーガーメニュー）を配置して、<strong>ボタンを押すと水平にスライドして、ナビゲーションリンクを表示</strong>します。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>A Material Design panel that slides in horizontally from the edge of a&nbsp;<a target="_self" href="https://api.flutter-io.cn/flutter/material/Scaffold-class.html">Scaffold</a>&nbsp;to show navigation links in an application.</p>



<p>There is a Material 3 version of this component,&nbsp;<a target="_self" href="https://api.flutter-io.cn/flutter/material/NavigationDrawer-class.html">NavigationDrawer</a>, that&#8217;s preferred for applications that are configured for Material 3 (see&nbsp;<a target="_self" href="https://api.flutter-io.cn/flutter/material/ThemeData/useMaterial3.html">ThemeData.useMaterial3</a>).</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/Drawer-class.html">Drawer class &#8211; material library &#8211; Dart API</a></cite></blockquote>



<p>drawerは、画面左にアイコンが配置されます。<br>一方でendDrawerは、画面右にアイコンが配置されます。</p>



<h3 class="wp-block-heading">bottomNavigationBar</h3>



<p><strong>画面の下部（ボトム）にナビゲーションバーを配置</strong>します。<br>アイコンやテキストを表示し、3つ～５つの項目を表示します。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>A material widget that&#8217;s displayed at the bottom of an app for selecting among a small number of views, typically between three and five.</p>



<p>There is an updated version of this component,&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/NavigationBar-class.html">NavigationBar</a>, that&#8217;s preferred for new applications and applications that are configured for Material 3 (see&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/ThemeData/useMaterial3.html">ThemeData.useMaterial3</a>).</p>



<p>The bottom navigation bar consists of multiple items in the form of text labels, icons, or both, laid out on top of a piece of material. It provides quick navigation between the top-level views of an app. For larger screens, side navigation may be a better fit.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/BottomNavigationBar-class.html">BottomNavigationBar class &#8211; material library &#8211; Dart API</a></cite></blockquote>



<h3 class="wp-block-heading">bottomSheet</h3>



<p>ユーザーは、ボトムシートを直接的に使うことはなく、<strong>ボタンを押すと、下部からテキストを添えたシートが表示される</strong>ものです。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>The&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/BottomSheet-class.html">BottomSheet</a>&nbsp;widget itself is rarely used directly. Instead, prefer to create a persistent bottom sheet with&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/ScaffoldState/showBottomSheet.html">ScaffoldState.showBottomSheet</a>&nbsp;or&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/bottomSheet.html">Scaffold.bottomSheet</a>, and a modal bottom sheet with&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/showModalBottomSheet.html">showModalBottomSheet</a>.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/BottomSheet-class.html">BottomSheet class &#8211; material library &#8211; Dart API</a></cite></blockquote>



<h3 class="wp-block-heading">backgroundColor</h3>



<p>ウィジェットの<strong>マテリアルに色</strong>を付けます。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>The color of the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Material-class.html">Material</a>&nbsp;widget that underlies the entire Scaffold.</p>



<p>The theme&#8217;s&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/ThemeData/scaffoldBackgroundColor.html">ThemeData.scaffoldBackgroundColor</a>&nbsp;by default.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/backgroundColor.html">backgroundColor property &#8211; Scaffold class &#8211; material library</a></cite></blockquote>



<p>現在は、primaryやonprimaryは非推奨となり、代替としてbackgroundColorとなりました。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-dart" data-lang="Dart"><code>this.primary = true,</code></pre></div>



<h3 class="wp-block-heading">extendBody</h3>



<p><strong>bodyの範囲ボトムナビゲーションバーまで拡張するプロパティ</strong>です。<br>同様に、extendBodyBehindAppBarはアプリケーションバーまで拡張するプロパティです。<br>通常では重ねませんが、trueにすることで変更できます。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>If true, and&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/bottomNavigationBar.html">bottomNavigationBar</a>&nbsp;or&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/persistentFooterButtons.html">persistentFooterButtons</a>&nbsp;is specified, then the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/body.html">body</a>&nbsp;extends to the bottom of the Scaffold, instead of only extending to the top of the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/bottomNavigationBar.html">bottomNavigationBar</a>&nbsp;or the&nbsp;<a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/persistentFooterButtons.html">persistentFooterButtons</a>.</p>
<cite><a target="_self" href="https://api.flutter.dev/flutter/material/Scaffold/extendBody.html">extendBody property &#8211; Scaffold class &#8211; material library</a></cite></blockquote>



<h3 class="wp-block-heading">restorationId</h3>



<p>Flutterフレームワークにおいて、ウィジェットの状態を保存し、ページで構成された<strong>ルートの状態を保存および復元するための復元ID</strong>。 <br>復元IDが指定されていない場合、ルートはその状態を復元されません。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Restoration ID to save and restore the state of the&nbsp;<a target="_self" href="https://api.flutter-io.cn/flutter/widgets/Route-class.html">Route</a>&nbsp;configured by this page.</p>



<p>If no restoration ID is provided, the&nbsp;<a target="_self" href="https://api.flutter-io.cn/flutter/widgets/Route-class.html">Route</a>&nbsp;will not restore its state.</p>
<cite><a target="_self" href="https://api.flutter-io.cn/flutter/widgets/Page/restorationId.html">restorationId property &#8211; Page class &#8211; widgets library &#8211; Dart API</a></cite></blockquote>



<h4 class="wp-block-heading">UdemyでFlutterを学習</h4>



<p><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2F">Udemy</a>は、オンデマンド式の学習講座です。<br>趣味から実務まで使えるおすすめの講座を紹介します。</p>



<div class="wp-block-cocoon-blocks-tab-box-1 blank-box bb-tab bb-pickup block-box has-border-color has-yellow-border-color">
<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fnzigen-flutter_beginner%2F">Flutterアプリ開発講座(初級編)<br></a>Flutterアプリ開発の初歩から学習できて、<br><strong>Flutter未経験・プログラミング初心者</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-widget%2F">【Flutter】UI開発でよく使うWidget50選</a><br>Flutterで頻出Widgetを紹介している。<br><strong>始めたばかりで機能を覚えたい人</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-bootcamp-with-dart%2F">The Complete Flutter Development Bootcamp with Dart</a><br>GoogleとFlutterチームが共同作成した講座。<br><strong>本格的なFlutterエンジニアになりたい人</strong>におすすめ</li>
</ul>
</div>



<h2 class="wp-block-heading">まとめ</h2>



<p>Scaffoldは、アプリケーションの基本的な構造やレイアウトを提供するウィジェットで、Flutterでのアプリ開発では必要不可欠な要素です。</p>



<p>主に、プロパティはアプリケーションバー、画面本体、ボトムバーから構成されています。<br>加えて、ボタンやドロワーなどのUI部品をウィジェットがあります。</p>



<p>これらを使ってFlutterでは、アプリケーション開発のハードルが低いです。</p>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://alicia-ing.com/programming/flutter/scaffold/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【Flutter】Androidアプリでのビルドエラーの対処法</title>
		<link>https://alicia-ing.com/programming/flutter/build-faild-with-an-exception/</link>
					<comments>https://alicia-ing.com/programming/flutter/build-faild-with-an-exception/#respond</comments>
		
		<dc:creator><![CDATA[アリッシア]]></dc:creator>
		<pubDate>Sun, 12 Nov 2023 07:50:38 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://alicia-ing.com/?p=4395</guid>

					<description><![CDATA[FlutterをAndroidのエミュレータでアプリを動作させようとすると、「Build faild with an exception.」というエラーで実行ができない場合があります。 この時、考えられる原因と対処方法を [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>FlutterをAndroidのエミュレータでアプリを動作させようとすると、「<strong>Build faild with an exception.</strong>」というエラーで実行ができない場合があります。</p>



<p>この時、考えられる原因と対処方法を紹介します。</p>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-check"><span class="label-box-label-text block-box-label-text box-label-text"><strong>本記事は次の人におすすめ</strong></span></div><div class="label-box-content block-box-content box-content">
<ul class="wp-block-list">
<li>FlutterでAndroidのエミュレータを動かせない</li>



<li>Build faild with an exception.を解決したい</li>
</ul>
</div></div>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>



<h2 class="wp-block-heading">Build faild with an exception.</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/11/Build-faild-with-an-exception.webp" alt="Build faild with an exceptionについて" class="wp-image-4544" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/Build-faild-with-an-exception.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/11/Build-faild-with-an-exception-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/Build-faild-with-an-exception-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/Build-faild-with-an-exception-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/Build-faild-with-an-exception-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p>「Build faild with an exception.」<br>このエラー文は、<strong>Androidのアプリケーション・ゲームを実行またはビルド</strong>した時に問題点があると表示されるものです。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>FlutterでAndroidアプリを作成する方法をまとめています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/android-emulator/" title="【Flutter】VScodeでAndroidエミュレータ起動" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】VScodeでAndroidエミュレータ起動</div><div class="blogcard-snippet internal-blogcard-snippet">AndroidアプリはAndroid Studioのインストール、Amdroid SDKが必要で、Android toolchaiの認識も同時に必須です。エミュレータの違法と聞いたことがあるかもしれませんが、エミュレータ自体は合法です。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2025.08.11</div></div></div></div></a>
</div>



<p>Flutterの他に、<strong>Unityのビルドが失敗した時にも表示</strong>されます。</p>



<h3 class="wp-block-heading">app_plugin_loaderの保管場所</h3>



<p>ほとんどの人は、app_plugin_loaderの保管が適切ではないことが考えられます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/what-went-wrong_0000.webp" alt="全角が表示" class="wp-image-4547" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/what-went-wrong_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/what-went-wrong_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/what-went-wrong_0000-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/what-went-wrong_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/what-went-wrong_0000-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>警告文に追従して、問題点が挙げられています。<br>要するに、app_plugin_loaderが存在しないと判断されています。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>*What went wrong:
A problem occurred evaluating setting &quot;android&quot;.

&gt;Could not read script &quot;C:\Users(USERNAME)\Desktop\@?????????\flutter\packages
\flutter_tools\gradle\app_plugin_loader.gradle&quot; as it does not exist.</code></pre></div>



<p>しかし、表示されたパスには、しっかりとflutterが保管されています。<br>原因は、<strong>パスに全角文字</strong>が含まれることです。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1423" height="113" src="https://alicia-ing.com/wp-content/uploads/2023/11/question.webp" alt="????は全角" class="wp-image-4549" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/question.webp 1423w, https://alicia-ing.com/wp-content/uploads/2023/11/question-300x24.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/question-1024x81.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/question-768x61.webp 768w" sizes="(max-width: 1423px) 100vw, 1423px" /></figure>



<p>全角では、その部分は<strong>「?」に置き換えられています。</strong><br>スクリプトを読み取ることができず、認識することができません。</p>



<p>flutterで環境構築するとき、配置する場所は全角文字のなくパスが複雑にならない場所に配置するべきです。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>Flutterのインストール方法を紹介しています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/vscode-setting/" title="【Flutter】VSCodeでWindowsの開発を環境構築" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】VSCodeでWindowsの開発を環境構築</div><div class="blogcard-snippet internal-blogcard-snippet">Windowsを使ってflutterでvscodeの環境構築を解説をしています。アプリの開発はOSごとに使用できる言語が異なりますが、Flutterはどちらも対応していて、企業の参入もしています。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2024.11.05</div></div></div></div></a>
</div>



<h3 class="wp-block-heading">対処法</h3>



<p>対処は簡単で、<strong>半角のみのパスを指定</strong>してください。<br>settings.jsonを開いて、「<strong>dart.flutterSdkPath</strong>」の内容を変更します。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-before.webp" alt="半角に変更" class="wp-image-4536" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-before.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-before-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-before-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-before-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-before-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>settings.jsonは、一般的にFlutterがインストールされたPCのパス「C:\Users\(USERNAME)\AppData\Roaming\Code\User\<strong>settings.json</strong>」から開くことができます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1919" height="425" src="https://alicia-ing.com/wp-content/uploads/2023/11/setting-place.webp" alt="settings.jsonの位置" class="wp-image-4537" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/setting-place.webp 1919w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-place-300x66.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-place-1024x227.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-place-768x170.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-place-1536x340.webp 1536w" sizes="(max-width: 1919px) 100vw, 1919px" /></figure>



<p>あるいは、<strong>VScodeを再度起動</strong>してください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/setting-json_0000.webp" alt="VScodeを再度起動" class="wp-image-4538" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/setting-json_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json_0000-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json_0000-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>The SDK configured in dart.flutterSdkPath is not a vaild SDK folder.</code></pre></div>



<p>SDKフォルダーが有効ではないと警告されています。<br>settings.jsonはここから開くことができます。</p>



<p>開いた後、平仮名、漢字などの全角を含むパスの部分を修正してください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-after.webp" alt="半角に変更" class="wp-image-4539" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-after.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-after-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-after-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-after-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/setting-json-after-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<h4 class="wp-block-heading">UdemyでFlutterを学習</h4>



<p><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2F">Udemy</a>は、オンデマンド式の学習講座です。<br>趣味から実務まで使えるおすすめの講座を紹介します。</p>



<div class="wp-block-cocoon-blocks-tab-box-1 blank-box bb-tab bb-pickup block-box has-border-color has-yellow-border-color">
<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fnzigen-flutter_beginner%2F">Flutterアプリ開発講座(初級編)<br></a>Flutterアプリ開発の初歩から学習できて、<br><strong>Flutter未経験・プログラミング初心者</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-widget%2F">【Flutter】UI開発でよく使うWidget50選</a><br>Flutterで頻出Widgetを紹介している。<br><strong>始めたばかりで機能を覚えたい人</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-bootcamp-with-dart%2F">The Complete Flutter Development Bootcamp with Dart</a><br>GoogleとFlutterチームが共同作成した講座。<br><strong>本格的なFlutterエンジニアになりたい人</strong>におすすめ</li>
</ul>
</div>



<h2 class="wp-block-heading">パッケージ再インストール</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/11/reinstall.webp" alt="再インストールについて" class="wp-image-4545" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/reinstall.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/11/reinstall-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/reinstall-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/reinstall-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/reinstall-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p>dart.flutterSdkPathを変更すると、パッケージが変更・破損するので、widgetがエラーを起こします。</p>



<p>これを修正しなければいけません。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/widget-error_0000.webp" alt="パッケージ破損" class="wp-image-4540" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/widget-error_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/widget-error_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/widget-error_0000-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/widget-error_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/widget-error_0000-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>flutter pub cache repair</code></pre></div>



<p>flutter pub cache repairは、pubspec.yamlのパッケージすべてをインストールします。<br>ターミナルに入力して、実行してください。</p>



<div class="wp-block-cocoon-blocks-icon-box common-icon-box block-box information-box">
<p>逆にすべてのパッケージを削除する場合は、「flutter clean」を使用します。</p>
</div>



<p>flutter pub cache repairを実行すると、パッケージがインストールされます。<br>その後、「Flutter run」を実行させてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/flutter-pub-cache-repair_0000.webp" alt="Flutter実行" class="wp-image-4541" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/flutter-pub-cache-repair_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/flutter-pub-cache-repair_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/flutter-pub-cache-repair_0000-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/flutter-pub-cache-repair_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/flutter-pub-cache-repair_0000-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p><br>パッケージすべてをダウンロードするので、少し時間がかかります。</p>



<p>完了後、F5、デバックを実行してください。<br>エミュレータで動作できるようになります。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/Complete_0000.webp" alt="実装例" class="wp-image-4543" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/Complete_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/Complete_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/Complete_0000-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/Complete_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/Complete_0000-1536x808.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<h2 class="wp-block-heading">まとめ</h2>



<p>Androidエミュレータを実行しようとしたときに、Build faild with an exception.が表示されてビルドできなかった場合、dart.flutterSdkPathに全角の文字が含まれることが考えられます。</p>



<p>その場合は、settings.jsonからパスを半角に変更することで解決できます。</p>



<p>さらに、パッケージが変更・破損してビルドできない場合は、ターミナルでflutter pub cache repairを実行してください。</p>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://alicia-ing.com/programming/flutter/build-faild-with-an-exception/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【Flutter】VScodeでAndroidエミュレータ起動</title>
		<link>https://alicia-ing.com/programming/flutter/android-emulator/</link>
					<comments>https://alicia-ing.com/programming/flutter/android-emulator/#respond</comments>
		
		<dc:creator><![CDATA[アリッシア]]></dc:creator>
		<pubDate>Fri, 10 Nov 2023 12:38:04 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://alicia-ing.com/?p=4337</guid>

					<description><![CDATA[Flutterの強みは、Android・iOSどちらも同時に開発ができることです。 現在、主流のアプリ開発できるプログラミング言語は、iOSであればSwift。AndroidであればKotlin。 アプリ開発は、ビジネス [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-check"><span class="label-box-label-text block-box-label-text box-label-text">本記事を読むと以下の実行ができます。</span></div><div class="label-box-content block-box-content box-content">
<p>Androidエミュレータを使って、アプリケーションを操作する。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1010" src="https://alicia-ing.com/wp-content/uploads/2023/11/complete.gif" alt="" class="wp-image-4501"/></figure>
</div></div>



<p>Flutterの強みは、<strong>Android・iOSどちらも同時に開発ができる</strong>ことです。</p>



<p>現在、主流のアプリ開発できるプログラミング言語は、<br><strong>iOSであればSwift。AndroidであればKotlin。</strong></p>



<p>アプリ開発は、ビジネスの中心でもあるので、<strong>求人も多数存在</strong>します。<br>しかし、Android、iOSどちらも開発をしようとすると<strong>2つの言語をマスター</strong>しなければいけません。</p>



<p>Flutterを使えば、<strong>UI・Widgetも豊富</strong>で、<strong>iOS・Androidいずれも開発</strong>できます。</p>



<p>本記事では、WindowsでFlutterを使ってAndroidアプリの開発環境を構築し、<br>さらに、エミュレーターを使ってアプリを実行します。</p>



<p>また、FlutterのインストールとVScodeの拡張機能のインストールは、<br>完了していることを想定しています。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>Flutterの環境構築を解説しています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/vscode-setting/" title="【Flutter】VSCodeでWindowsの開発を環境構築" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/10/vscode-setting-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】VSCodeでWindowsの開発を環境構築</div><div class="blogcard-snippet internal-blogcard-snippet">Windowsを使ってflutterでvscodeの環境構築を解説をしています。アプリの開発はOSごとに使用できる言語が異なりますが、Flutterはどちらも対応していて、企業の参入もしています。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2024.11.05</div></div></div></div></a>
</div>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-check"><span class="label-box-label-text block-box-label-text box-label-text">本記事は次の人におすすめ</span></div><div class="label-box-content block-box-content box-content">
<ul class="wp-block-list">
<li>Flutterでアプリ開発をしたい。</li>



<li>Android Studioの導入・設定を知りたい。</li>



<li>エミュレーターを起動したい。</li>
</ul>
</div></div>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>



<h2 class="wp-block-heading">Android Studio</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/11/android-studio.webp" alt="" class="wp-image-4473" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/android-studio.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p>Android Studioは、<strong>Androidアプリを開発するために必要なツール</strong>で、<br>FlutterをVScodeで使用する時も、インストールが必要になるツールです。</p>



<p>要するに、<strong>Androidアプリを実行するときは必ず必要になるソフトウェア</strong>です。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Android Studio は Android アプリ開発用の公式の統合開発環境（IDE）です。&nbsp;<a target="_self" href="https://www.jetbrains.com/idea/">IntelliJ IDEA</a>&nbsp;の強力なコードエディタとデベロッパー ツールをベースとした Android Studio には、Android アプリを構築する際の生産性向上に役立つ次のような多くの機能が用意されています。</p>
<cite><a target="_self" href="https://developer.android.com/studio/intro?hl=ja">Android Studio の概要</a></cite></blockquote>



<p><strong>コマンドプロンプト</strong>で使用できるパッケージを確認します。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>flutter doctor</code></pre></div>



<p>入力して、実行（Enter）すると、[√]・[×]・[!]があります。</p>



<p>この時、<strong>[×]・[!]は、インストールされていない。</strong><br><strong>ライセンスに承諾していない</strong>ことが挙げられます。</p>



<p>Androidアプリの開発には、<strong>Android Studioと Android toolchainの２つを[√]に認識させる</strong>必要があります。</p>



<h3 class="wp-block-heading">Android Studioインストール</h3>



<p><a target="_self" href="https://developer.android.com/studio" title="公式サイト">公式サイト</a>からAndroid Studioをダウンロードします。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/Android-Studio-Dl_0000.webp" alt="" class="wp-image-4474" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/Android-Studio-Dl_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/Android-Studio-Dl_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/Android-Studio-Dl_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/Android-Studio-Dl_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/Android-Studio-Dl_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>「Android Studio Giraffeをダウンロードする」に進み、<strong>ライセンス・規約を読み、承諾してダウンロード</strong>してください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/read-agree_0000.webp" alt="" class="wp-image-4475" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/read-agree_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/read-agree_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/read-agree_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/read-agree_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/read-agree_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>ダウンロードしたインストーラ―をクリックして、<strong>Nextで読み進めてインストールを完了</strong>させてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-setup_0000.webp" alt="" class="wp-image-4476" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-setup_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-setup_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-setup_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-setup_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/android-studio-setup_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>インストール後、ライセンスの同意や各種情報を「Accept」で進んでください。<br>このとき、<strong>ダウンロードに時間がかかります。自分は、15分程度</strong>でした。<br><strong>ゲージが全く動く気配がありませんが、突然動く</strong>ので気長に待ってインストールを完了させてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/license-agreement_0000.webp" alt="" class="wp-image-4477" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/license-agreement_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/license-agreement_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/license-agreement_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/license-agreement_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/license-agreement_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>Flutter doctorで確認すると、Android Studioの表示は[√]となり、認識されました。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1693" height="850" src="https://alicia-ing.com/wp-content/uploads/2023/11/complete-andstu_0000-1.webp" alt="" class="wp-image-4491" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/complete-andstu_0000-1.webp 1693w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andstu_0000-1-300x151.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andstu_0000-1-1024x514.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andstu_0000-1-768x386.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andstu_0000-1-1536x771.webp 1536w" sizes="(max-width: 1693px) 100vw, 1693px" /></figure>



<h3 class="wp-block-heading">Command-line Toolsをインストール</h3>



<p>Android Studioをインストールしても、まだエミュレートすることはできません。</p>



<p>flutter doctorでAndroid toolchaiを認識する必要があります。<br>項目「cmdline-tools component is missing」の警告文通り、<strong>Command-line Toolsをインストール</strong>します。</p>



<div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-border-color has-point-color has-blue-border-color has-blue-point-color cocoon-block-timeline"><div class="timeline-title">手順</div><ul class="timeline">
<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step1</div><div class="timeline-item-content cf"><div class="timeline-item-title">Android Studioを開く</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step2</div><div class="timeline-item-content cf"><div class="timeline-item-title">Settings</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step3</div><div class="timeline-item-content cf"><div class="timeline-item-title">Appearance &amp; Behavior</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step4</div><div class="timeline-item-content cf"><div class="timeline-item-title">System Settings</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step5</div><div class="timeline-item-content cf"><div class="timeline-item-title">Android SDK</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step6</div><div class="timeline-item-content cf"><div class="timeline-item-title">SDK Tools</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step7</div><div class="timeline-item-content cf"><div class="timeline-item-title">Android SDK Command-line Tools(latest)チェックを入れて、Apply</div><div class="timeline-item-snippet"></div></div></li>
</ul></div>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/androidsdk_0000.webp" alt="" class="wp-image-4478" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/androidsdk_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/androidsdk_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/androidsdk_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/androidsdk_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/androidsdk_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>Applyをクリックすると、インストールが始まります。<br>完了後、finishをクリックしてください。</p>



<p>Flutter doctorで確認すると、無事にインストールが完了していることが分かります。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/complete-Com_0000.webp" alt="" class="wp-image-4480" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/complete-Com_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-Com_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-Com_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-Com_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-Com_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading">Android license status unknown</h3>



<p>最後にライセンスを確認します。</p>



<p>Android licenseの取得は、コマンドプロンプトで得ることができます。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>&gt;flutter doctor --android-licenses</code></pre></div>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/doctor-android-licenses_0000.webp" alt="" class="wp-image-4481" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/doctor-android-licenses_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/doctor-android-licenses_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/doctor-android-licenses_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/doctor-android-licenses_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/doctor-android-licenses_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p><strong>ライセンスに承諾する場合は「y」</strong>、否認する場合は「N」を入力して、<strong>Enterキーを入力</strong>します。<br>Androidアプリを作りたい場合は、ライセンスに承諾する必要がありますので、yを6回入力します。</p>



<p>これにて、ライセンスの取得もできたので、最後にflutter doctorで<strong>Android toolchaiも[√]</strong>となり、認識されます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/complete-andli_0000-1.webp" alt="" class="wp-image-4483" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/complete-andli_0000-1.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andli_0000-1-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andli_0000-1-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andli_0000-1-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-andli_0000-1-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>以上でAndroid Studioの各種設定が終了です。</p>



<h2 class="wp-block-heading">エミュレータを設定</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/11/emulator.webp" alt="" class="wp-image-4484" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/emulator.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/11/emulator-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/emulator-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/emulator-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/emulator-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p>Android StudioとAndroid toolchaiを認識できたので、flutterのコードを実行した時にどのような処理がされるか確認するために<strong>エミュレータを作成</strong>します。</p>



<p>エミュレータは、英語のemulateから分かる通り「まねる、模倣する」という意味になります。<br>要するに、<strong>擬似的に環境を構築するソフトウェアやハードウェア</strong>のことを指します。</p>



<p>エミュレータを使うことで、<strong>Windows上でAndroidのアプリを動作させる</strong>ことができます。<br>アプリケーションは本来、PC・AndroidはOSに依存し、開発されたソフトウェアを異なる環境下で動作させることはできません。</p>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-graduation-cap"><span class="label-box-label-text block-box-label-text box-label-text">エミュレータは違法？</span></div><div class="label-box-content block-box-content box-content">
<div class="wp-block-cocoon-blocks-icon-box common-icon-box block-box alert-box">
<p>詳細は、法律の専門家による言及を確認してください。</p>
</div>



<p>「<strong>エミュレータは違法</strong>」ーこの言葉を耳にしたことがある方もいるでしょう。</p>



<p>結論を言うと、<strong>エミュレータは合法</strong>。<br>ただし、<strong>使い方の注意は必要</strong>です。</p>



<p>エミュレータの用途として、本記事のようなアプリ開発の他に<strong>ゲームのプレイ</strong>があります。</p>



<p>ゲームを自分で購入して遊ぶことは良いですが、ネット上にアップロードされた<strong>違法なものをダウンロード</strong>したり、他者から<strong>データを譲渡</strong>したりすることは法に触れます。<br>さらに、<strong>自分でROMを配布・売却</strong>する。<strong>コピープロテクトを解除</strong>する行為も罪に問われます。</p>
</div></div>



<p>Flutterでは、エミュレータを使うことで<strong>コードを書き替えてすぐに変更内容が反映</strong>されます。<br>実機を使うよりも開発に便利です。</p>



<h3 class="wp-block-heading">エミュレータの作成</h3>



<p><strong>エミュレータの作成は、Android Studio</strong>で行います。<br>公式で用意するので、<strong>エミュレータ自体に違法性がない</strong>ことが言えます。</p>



<p>Android Studioを起動して、<strong>More ActionsのVirtual Device Mangagerを選択</strong>してください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="950" src="https://alicia-ing.com/wp-content/uploads/2023/11/virtual-devidemanager_0000.webp" alt="" class="wp-image-4485" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/virtual-devidemanager_0000.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/11/virtual-devidemanager_0000-300x148.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/virtual-devidemanager_0000-1024x507.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/virtual-devidemanager_0000-768x380.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/virtual-devidemanager_0000-1536x760.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>Create virutal deviceを選択し、<strong>任意のデバイス</strong>を選択してNextに進んでください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1693" height="885" src="https://alicia-ing.com/wp-content/uploads/2023/11/creat-device_0000.webp" alt="" class="wp-image-4486" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/creat-device_0000.webp 1693w, https://alicia-ing.com/wp-content/uploads/2023/11/creat-device_0000-300x157.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/creat-device_0000-1024x535.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/creat-device_0000-768x401.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/creat-device_0000-1536x803.webp 1536w" sizes="(max-width: 1693px) 100vw, 1693px" /></figure>



<p>system imageですが、<strong>現在選択されているもので良い</strong>です。<br>本記事では、Rで進めていきます。<br>インストールされていない場合は、ダウンロードマークを押して、表示させてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1693" height="890" src="https://alicia-ing.com/wp-content/uploads/2023/11/R-install_0000.webp" alt="" class="wp-image-4487" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/R-install_0000.webp 1693w, https://alicia-ing.com/wp-content/uploads/2023/11/R-install_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/R-install_0000-1024x538.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/R-install_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/R-install_0000-1536x807.webp 1536w" sizes="(max-width: 1693px) 100vw, 1693px" /></figure>



<p>名前を付けて（AVD Name）、Finishで完了です。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1687" height="888" src="https://alicia-ing.com/wp-content/uploads/2023/11/complete-AVD_0000.webp" alt="" class="wp-image-4488" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/complete-AVD_0000.webp 1687w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-AVD_0000-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-AVD_0000-1024x539.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-AVD_0000-768x404.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/11/complete-AVD_0000-1536x809.webp 1536w" sizes="(max-width: 1687px) 100vw, 1687px" /></figure>



<h4 class="wp-block-heading">UdemyでFlutterを学習</h4>



<p><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2F">Udemy</a>は、オンデマンド式の学習講座です。<br>趣味から実務まで使えるおすすめの講座を紹介します。</p>



<div class="wp-block-cocoon-blocks-tab-box-1 blank-box bb-tab bb-pickup block-box has-border-color has-yellow-border-color">
<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fnzigen-flutter_beginner%2F">Flutterアプリ開発講座(初級編)<br></a>Flutterアプリ開発の初歩から学習できて、<br><strong>Flutter未経験・プログラミング初心者</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-widget%2F">【Flutter】UI開発でよく使うWidget50選</a><br>Flutterで頻出Widgetを紹介している。<br><strong>始めたばかりで機能を覚えたい人</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-bootcamp-with-dart%2F">The Complete Flutter Development Bootcamp with Dart</a><br>GoogleとFlutterチームが共同作成した講座。<br><strong>本格的なFlutterエンジニアになりたい人</strong>におすすめ</li>
</ul>
</div>



<h2 class="wp-block-heading">実演（エミュレータアプリを実行）</h2>



<p>エミュレータも作成できたので、いよいよ実行します。</p>



<p>VScodeを開いて、<strong>青帯の「No Device」から作成したエミュレータを選択</strong>してください。<br>あるいは、実行とデバック（or F5）で実行しようとすると、デバイス決定を促されます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="807" height="82" src="https://alicia-ing.com/wp-content/uploads/2023/11/nodevice.webp" alt="" class="wp-image-4489" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/nodevice.webp 807w, https://alicia-ing.com/wp-content/uploads/2023/11/nodevice-300x30.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/11/nodevice-768x78.webp 768w" sizes="(max-width: 807px) 100vw, 807px" /></figure>



<p>スクリプトとエミュレータの接続が正常に行われると、画面に表示されます。<br>冒頭で紹介したように、画面上でしっかりと動作することも確認できます。</p>



<p>本記事の手順でAndroid Studioをインストールして、<br>エミュレータを操作しようとしたけれど、エラー生じる。</p>



<p>そのような場合は、<strong>ファイルの名前が不適切な可能性</strong>があります。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>ビルドエラーの対策を解説しています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/build-faild-with-an-exception/" title="【Flutter】Androidアプリでのビルドエラーの対処法" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】Androidアプリでのビルドエラーの対処法</div><div class="blogcard-snippet internal-blogcard-snippet">AndroidエミュレータでBuild faild with an exceptionでビルドできなかった場合は、settings.jsonからパスを全角から半角に変更することで解決できます。同時にパッケージが破損することがあります。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2025.08.11</div></div></div></div></a>
</div>



<h2 class="wp-block-heading">まとめ</h2>



<p>Androidアプリを作るには、Android Studioをインストールして、Amdroid SDKを設定する必要があります。</p>



<p>また、Android toolchaiを認識するために、Command-line ToolsのインストールとAndroid licenseの取得が必要です。</p>



<p>エミュレータを作成すると、無事にVScodeでアンドロイドアプリを動作させることができます。<br>エミュレータの違法という言葉を耳にするかもしれませんが、エミュレータ自体は合法です。<br>エミュレータを使ってROMを違法にダウンロードしたり、譲渡したりする行為が犯罪になります。</p>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://alicia-ing.com/programming/flutter/android-emulator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>【Flutter】VSCodeでWindowsの開発を環境構築</title>
		<link>https://alicia-ing.com/programming/flutter/vscode-setting/</link>
		
		<dc:creator><![CDATA[アリッシア]]></dc:creator>
		<pubDate>Tue, 17 Oct 2023 13:56:47 +0000</pubDate>
				<category><![CDATA[Flutter]]></category>
		<guid isPermaLink="false">https://alicia-ing.com/?p=3835</guid>

					<description><![CDATA[現在は、PCを持っていないけれど、スマホやタブレットを持っている人が多いです。 スマホが登場して早何十年と経過して、大学や大学院で学んだ人や業務で開発をする人ではなくとも、アプリ開発はだれでも簡単に作成することができるよ [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-flag"><span class="label-box-label-text block-box-label-text box-label-text">本記事を読むと以下の実行ができます</span></div><div class="label-box-content block-box-content box-content">
<p>FlutterをVScodeからデバックをする。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1008" src="https://alicia-ing.com/wp-content/uploads/2023/10/Complete-chrome.gif" alt="chromeでのFlutter実行" class="wp-image-7309"/></figure>
</div></div>



<p>現在は、PCを持っていないけれど、スマホやタブレットを持っている人が多いです。</p>



<p>スマホが登場して早何十年と経過して、大学や大学院で学んだ人や業務で開発をする人ではなくとも、<strong>アプリ開発はだれでも簡単に作成することができる</strong>ようになりその敷居は低くなりました。</p>



<p><strong>一般的にアプリはOSによって使うプログラミング言語が異なります。</strong><br>したがって、iOS版を作りたいならiOS向けの言語、<br>Android版を作りたいならAndroid向けの言語を使わなければなりません。</p>



<p>しかし、FlutterはiOSとAndroidどちらにも対応した言語です。<br>Flutterならば<strong>OSのことを一切考えず、</strong><br>どちらにも最適なものとして開発を進めることができます。</p>



<p>さらに、<strong>FlutterはVisual Stadio Codeのプラグインがある</strong>ので、<br>アプリ開発をしたことがない初心者でも作成することができます。</p>



<p>本記事では使用しているPCにFlutterをインストールしてVSCodeで使えるようにします。</p>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-check"><span class="label-box-label-text block-box-label-text box-label-text">本記事は次の人におすすめ</span></div><div class="label-box-content block-box-content box-content">
<ul class="wp-block-list">
<li>アプリ開発をしたい。</li>



<li>Flutterをインストールしたい。</li>



<li>VScodeでFlutterを開発したい。</li>
</ul>
</div></div>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>



<h2 class="wp-block-heading">スマホアプリのプログラミング言語</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/10/application.webp" alt="アプリ開発について" class="wp-image-3912" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/application.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/10/application-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/application-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/application-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/application-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p><strong>スマホアプリを開発する言語は非常に多くあります。</strong></p>



<p>例として８つの言語を列挙し、iOS、Androidで使えるか、<br>難易度は様々な意見を参考にして自分の目安でつけています。</p>



<figure class="wp-block-table aligncenter"><div class="scrollable-table"><table><tbody><tr><td class="has-text-align-center" data-align="center">言語</td><td class="has-text-align-center" data-align="center">iOS</td><td class="has-text-align-center" data-align="center">Android</td><td class="has-text-align-center" data-align="center">使用言語</td><td class="has-text-align-center" data-align="center">目安難易度（最大５）</td></tr><tr><td class="has-text-align-center" data-align="center">Swift</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">×</td><td class="has-text-align-center" data-align="center">Swift</td><td class="has-text-align-center" data-align="center">3</td></tr><tr><td class="has-text-align-center" data-align="center">Java</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">Java</td><td class="has-text-align-center" data-align="center">4</td></tr><tr><td class="has-text-align-center" data-align="center">Kotlin</td><td class="has-text-align-center" data-align="center">△</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">簡単なJava</td><td class="has-text-align-center" data-align="center">3</td></tr><tr><td class="has-text-align-center" data-align="center">Xamarin</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">C#</td><td class="has-text-align-center" data-align="center">3.5~4</td></tr><tr><td class="has-text-align-center" data-align="center">ReactNative</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">JavaScript</td><td class="has-text-align-center" data-align="center">２</td></tr><tr><td class="has-text-align-center" data-align="center"><strong>Flutter</strong></td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center"><strong>Dart</strong></td><td class="has-text-align-center" data-align="center"><strong>2.5</strong></td></tr><tr><td class="has-text-align-center" data-align="center">Unity</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">C#</td><td class="has-text-align-center" data-align="center">3.5</td></tr><tr><td class="has-text-align-center" data-align="center">Unereal Engine</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">〇</td><td class="has-text-align-center" data-align="center">C++</td><td class="has-text-align-center" data-align="center">5</td></tr></tbody></table></div></figure>



<p>一般的にアプリ開発はiOS、Androidどちらでも使えるマルチプラットフォームではなく、<br><strong>Swift</strong>や<strong>Kotlin</strong>のような<strong>ネイティブ言語</strong>の方がよいと言われています。</p>



<p>例えば、Xamarinで開発する際にC#の他にもAndroidとiOSのSDK、.NET Framework、Xamarin.Forms（iOS）（Android）の知識が必要になります。</p>



<p>実際にXamarinを開発をしたことがあり、個人で使う分には良かったです。<br>しかし、App StoreやGoogle Play Storeに出品できるものが作れるかというと、<br><strong>相当な経験と技術が必要</strong>になると感じました。</p>



<p>さらに、<strong>案件ではSwiftとKotlinがほとんど</strong>です。<br>仕事にしやすいことから、iOSならばSwift、AndroidならばKotlinを学ぶべきでしょう。</p>



<div class="wp-block-cocoon-blocks-label-box-1 label-box block-box cocoon-block-label-box"><div class="label-box-label block-box-label box-label fab-graduation-cap"><span class="label-box-label-text block-box-label-text box-label-text">KotlinでiOSアプリ作成</span></div><div class="label-box-content block-box-content box-content">
<p>表では、△にしていたところですが、<strong>2023年5月に、KotlinでiOSアプリ作成できるように</strong>なる「Compose Multiplatform for iOS」アルファ版をリリースを発表しました。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>JetBrains released Compose Multiplatform for iOS as Alpha, meaning it’s ready to be used in experiments and toy projects. Try it out, and help shape the future of shared mobile user interfaces with Kotlin!</p>
<cite><a target="_self" href="https://blog.jetbrains.com/kotlin/2023/05/compose-multiplatform-for-ios-is-in-alpha/" title="Compose Multiplatform for iOS Is in Alpha">Compose Multiplatform for iOS Is in Alpha</a></cite></blockquote>
</div></div>



<h2 class="wp-block-heading">Flutter</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter.webp" alt="Flutterについて" class="wp-image-3913" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p>前述の通りだと<strong>Flutterも学ぶべきではないと危機感</strong>があるかもしれません。<br>Flutterは最近注目を集めている言語で、<strong>今後需要が高まる可能性</strong>があります。</p>



<p>Flutterは、2018年に<strong>Googleがリリースしたモバイルフレームワーク</strong>で比較的新しく、<br>クロスプラットフォームで<strong>iOSとAndroidのアプリを開発</strong>できます。</p>



<p><strong>歴史が浅い</strong>ので、Flutterの情報が上記の言語よりも少ないです。<br>また、<strong>Dart</strong>という<strong>非常にマニアックな言語</strong>を使用します。</p>



<div class="wp-block-cocoon-blocks-tab-caption-box-1 tab-caption-box block-box has-border-color has-light-green-border-color not-nested-style cocoon-block-tab-caption-box" style="--cocoon-custom-border-color:#8bc34a"><div class="tab-caption-box-label block-box-label box-label fab-graduation-cap"><span class="tab-caption-box-label-text block-box-label-text box-label-text">Dartの歴史</span></div><div class="tab-caption-box-content block-box-content box-content">
<p>Dartは、2011年にGoogle社が<strong>Javascriptの問題を改善するために開発</strong>されましたが、<br>2012年にJavaScriptの拡張としてMicrosoft社が「TypeScript」を開発しました。</p>



<p>Google社もTypeScriptを採用したことで、<br><strong>Dartは学ぶ価値のないプログラミング言語</strong>という扱いでした。</p>
</div></div>



<p>Dartは、<strong>JavaScriptの改善</strong>した言語で、<br>さらに<strong>JavaとC#の影響を受けた</strong>言語で、文法が酷似しています。</p>



<p>Unityでのゲーム開発（C#）や動的なウェブデザイン(JavaScript)をしている人は、<br>Dartの学習コストは低いことでしょう。</p>



<div class="wp-block-cocoon-blocks-tab-caption-box-1 tab-caption-box block-box has-text-color has-background has-border-color has-black-color has-ex-a-background-color has-blue-border-color cocoon-block-tab-caption-box"><div class="tab-caption-box-label block-box-label box-label fab-star"><span class="tab-caption-box-label-text block-box-label-text box-label-text">1から10までの偶数和</span></div><div class="tab-caption-box-content block-box-content box-content">
<ul class="wp-block-list">
<li><strong>JavaScript</strong></li>
</ul>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-js" data-lang="JavaScript"><code>let sum = 0;
for (let i = 1; i &lt;= 10; i++) {
  if (i % 2 === 0) {
    sum += i;
  }
}
console.log(&quot;1から10までの偶数和:&quot; + sum);</code></pre></div>



<ul class="wp-block-list">
<li><strong>Unity</strong></li>
</ul>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-csharp" data-lang="C#"><code>using UnityEngine;

public class EvenSum : MonoBehaviour
{
    void Start()
    {
        int sum = 0;
        for (int i = 1; i &lt;= 10; i++)
        {
            if (i % 2 == 0)
            {
                sum += i;
            }
        }
        Debug.Log(&quot;1から10までの偶数和: &quot; + sum);
    }
}</code></pre></div>



<ul class="wp-block-list">
<li><strong>Dart</strong></li>
</ul>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-dart" data-lang="Dart"><code>void main() {
  int sum = 0;
  for (int i = 1; i &lt;= 10; i++) {
    if (i % 2 == 0) {
      sum += i;
    }
  }
  print(&quot;1から10までの偶数和: $sum&quot;);
}
</code></pre></div>
</div></div>



<p>公式ページの「<a target="_self" title="Build apps for any screen" href="https://flutter.dev/">Build apps for any screen</a>」を参照すると、<br><strong>BMWのアプリ</strong>がFlutterで作成されていると紹介されています。</p>



<p>また、リクルートが運営する日本の宿・ホテルの予約サイト「<strong>じゃらん</strong>」も<br>Flutterで作成されています。</p>



<p>関連：「<a target="_self" title="【Flutter】iOSプロジェクトへのAdd-to-appにおける3つのOptionの比較" href="https://blog.recruit.co.jp/rls/2020-04-17-add-to-app/">【Flutter】iOSプロジェクトへのAdd-to-appにおける3つのOptionの比較</a>」</p>



<p>その他にも<strong>トヨタ</strong>や<strong>Google系のアプリ</strong>で採用されています。</p>



<h2 class="wp-block-heading">VScodeでFlutterを使用する</h2>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1980" height="1020" src="https://alicia-ing.com/wp-content/uploads/2023/10/VScode.webp" alt="VScodeについて" class="wp-image-3915" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/VScode.webp 1980w, https://alicia-ing.com/wp-content/uploads/2023/10/VScode-300x155.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/VScode-1024x528.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/VScode-768x396.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/VScode-1536x791.webp 1536w" sizes="(max-width: 1980px) 100vw, 1980px" /></figure>



<p><strong>Flutterを開発する環境は、VScodeがおすすめ</strong>です。</p>



<p>VScodeを開いて、<strong>Ctrl + Shift +X</strong>。<br>あるいは<strong>サイドの拡張機能を選択</strong>してください。</p>



<p>検索バーに「<strong>Flutter</strong>」 と入力し、インストールします。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="389" height="420" src="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-vscode.webp" alt="検索バーでFlutterと検索" class="wp-image-3916" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-vscode.webp 389w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-vscode-278x300.webp 278w" sizes="(max-width: 389px) 100vw, 389px" /></figure>



<p>今は、プラグインをインストールしただけで、<br><strong>Flutterのパッケージ</strong>をインストールしたわけではありません。</p>



<p>Flutterを稼働させるために、<br>上部の検索バーに「<strong>&gt;Flutter:New Project</strong>」と入力して実行すると、次のような警告文が出ます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="332" src="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-New-Project.webp" alt="Flutter:New Projectと検索" class="wp-image-3917" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-New-Project.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-New-Project-300x52.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-New-Project-1024x177.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-New-Project-768x133.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-New-Project-1536x266.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>要するに、プログラムやAPI(アプリケーションプログラミングインタフェース)、サンプルコードなどをパッケージにした<strong>SDK（ソフトウェア開発キット）をダウンロードするように指示</strong>されます。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="559" height="145" src="https://alicia-ing.com/wp-content/uploads/2023/10/Download-SDK.webp" alt="エラー文" class="wp-image-3918" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Download-SDK.webp 559w, https://alicia-ing.com/wp-content/uploads/2023/10/Download-SDK-300x78.webp 300w" sizes="(max-width: 559px) 100vw, 559px" /></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Cound not find a Flutter SDK. Please downloaded, or, if already downloaded, click &#8216;Locate SDK&#8217;.</p>
<cite>Visual Studio Code</cite></blockquote>



<p>したがって、Flutter SDKをダウンロードします。</p>



<div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-border-color has-point-color has-blue-border-color has-blue-point-color cocoon-block-timeline"><div class="timeline-title">Flutterが使えるようになるまで</div><ul class="timeline">
<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step1</div><div class="timeline-item-content cf"><div class="timeline-item-title">Flutter SDKのインストール</div><div class="timeline-item-snippet">
<p></p>
</div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step2</div><div class="timeline-item-content cf"><div class="timeline-item-title">Pathを通す</div><div class="timeline-item-snippet">
<p></p>
</div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step3</div><div class="timeline-item-content cf"><div class="timeline-item-title">開発環境を設定</div><div class="timeline-item-snippet"></div></div></li>
</ul></div>



<h3 class="wp-block-heading">Flutter SDKをインストール</h3>



<div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-border-color has-point-color has-blue-border-color has-blue-point-color cocoon-block-timeline"><div class="timeline-title">Flutter SDKインストール</div><ul class="timeline">
<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step1</div><div class="timeline-item-content cf"><div class="timeline-item-title">Flutter SDKのインストールページに移動</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step2</div><div class="timeline-item-content cf"><div class="timeline-item-title">Get the Flutter SDKでzipファイルをダウンロード</div><div class="timeline-item-snippet">
<p></p>
</div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step3</div><div class="timeline-item-content cf"><div class="timeline-item-title">解答したファイルを所定のディレクトリに配置</div><div class="timeline-item-snippet"></div></div></li>
</ul></div>



<p>警告文の青枠&#8221;Download SDK&#8221;を選択してください。（<a target="_self" href="https://docs.flutter.dev/get-started/install" title="Flutter SDKインストールページ">Flutter SDKインストールページ</a>）</p>



<p>Windows、MacOS、Linux、ChromeOSの内、<br><strong>自分が使用しているPCのOSに該当するものを選択</strong>してください。</p>



<p>※投稿者が使うPCのOSにより、Windowsで進行していきます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install.webp" alt="パッケージのインストール" class="wp-image-3919" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-300x169.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-1024x576.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-768x432.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-1536x864.webp 1536w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-install-320x180.webp 320w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>下にスクロールを進めて、画像に示す「Get the Flutter SDK」の<strong>zipファイル</strong>「flutter_windows_3.13.7-stable.zip」をインストールしてください。</p>



<p>zipファイルのバージョンは変わっている場合がありますが、最新版をインストールしてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1080" src="https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK.webp" alt="windowsで取得" class="wp-image-3920" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-300x169.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-1024x576.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-768x432.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-1536x864.webp 1536w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/10/Get-the-Flutter-SDK-320x180.webp 320w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>解凍後、ダウンロードファイルは、<strong>分かりやすいディレクトリに配置</strong>してください。<br><strong>Cドライブ直下</strong>にすることで、間違いが無くなるのでおすすめです。</p>



<p>全角文字（ひらがな、カタカナなど）が含むフォルダー内だと、<br><strong>正常にPathが認識しないことがある</strong>ので避けるべきです。</p>



<p>プログラミングで全角を使うと、<strong>文字化け</strong>したり<strong>ビルドエラー</strong>になることもあるので、<br>全て半角するようにしてください。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>ビルドエラーの対処法を紹介しています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/build-faild-with-an-exception/" title="【Flutter】Androidアプリでのビルドエラーの対処法" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/11/build-faild-with-an-exception-1-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】Androidアプリでのビルドエラーの対処法</div><div class="blogcard-snippet internal-blogcard-snippet">AndroidエミュレータでBuild faild with an exceptionでビルドできなかった場合は、settings.jsonからパスを全角から半角に変更することで解決できます。同時にパッケージが破損することがあります。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2025.08.11</div></div></div></div></a>
</div>



<h3 class="wp-block-heading">Pathを通す</h3>



<div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-border-color has-point-color has-blue-border-color has-blue-point-color cocoon-block-timeline"><div class="timeline-title">Pathを通過</div><ul class="timeline">
<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step1</div><div class="timeline-item-content cf"><div class="timeline-item-title">設定>システム>バージョン情報>システムの詳細設定を開く</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step2</div><div class="timeline-item-content cf"><div class="timeline-item-title">ユーザーの環境変数のPathにbinフォルダーを追加</div><div class="timeline-item-snippet">
<p></p>
</div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step3</div><div class="timeline-item-content cf"><div class="timeline-item-title">コマンドプロンプトでインストールできたか確認</div><div class="timeline-item-snippet"></div></div></li>
</ul></div>



<p><strong>Flutterのコマンドが使える様にbinフォルダのPathを通します。</strong></p>



<p>設定からシステム、パージョン情報に進んでください。<br>デバイスの仕様で、「<strong>システムの詳細設定</strong>」を開いてください。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="537" src="https://alicia-ing.com/wp-content/uploads/2023/10/system-setting-1024x537.webp" alt="システムの詳細設定" class="wp-image-3921" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/system-setting-1024x537.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/system-setting-300x157.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/system-setting-768x402.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/system-setting-1536x805.webp 1536w, https://alicia-ing.com/wp-content/uploads/2023/10/system-setting.webp 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>システムのプロパティ内の詳細設定を選択した後、「<strong>環境変数</strong>」を選択してください。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="662" height="859" src="https://alicia-ing.com/wp-content/uploads/2023/10/environment-variable.webp" alt="システムのプロパティの環境設定" class="wp-image-3922" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/environment-variable.webp 662w, https://alicia-ing.com/wp-content/uploads/2023/10/environment-variable-231x300.webp 231w" sizes="(max-width: 662px) 100vw, 662px" /></figure>



<p>Pathは、２つの環境変数ともにあります。<br><strong>ユーザー（上部）の方の環境変数を選択</strong>し、「編集」を開いてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="870" height="960" src="https://alicia-ing.com/wp-content/uploads/2023/10/path-1.webp" alt="path編集" class="wp-image-3925" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/path-1.webp 870w, https://alicia-ing.com/wp-content/uploads/2023/10/path-1-272x300.webp 272w, https://alicia-ing.com/wp-content/uploads/2023/10/path-1-768x847.webp 768w" sizes="(max-width: 870px) 100vw, 870px" /></figure>



<p>新規で、<strong>先ほど解凍したファイルのディレクトリーパスを追加</strong>してください。<br>例えば、Cドライブ直下にした場合は、以下のようになります。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>C:\flutter\bin</code></pre></div>



<p>OKを選択して、追加できたか確認します。</p>



<figure class="wp-block-image aligncenter size-full"><img loading="lazy" decoding="async" width="743" height="811" src="https://alicia-ing.com/wp-content/uploads/2023/10/bin.webp" alt="追加を確認" class="wp-image-3926" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/bin.webp 743w, https://alicia-ing.com/wp-content/uploads/2023/10/bin-275x300.webp 275w" sizes="(max-width: 743px) 100vw, 743px" /></figure>



<p><strong>コマンドプロンプトを開いて、以下を入力</strong>してください。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>flutter --version</code></pre></div>



<p>画像のように、<strong>Flutterの詳細情報が表示されると正常にインストール</strong>できました。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1006" src="https://alicia-ing.com/wp-content/uploads/2023/10/flutter-version.webp" alt="コマンドプロンプトで確認" class="wp-image-3927" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/flutter-version.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-version-300x157.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-version-1024x537.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-version-768x402.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-version-1536x805.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<h3 class="wp-block-heading">開発環境を設定</h3>



<div class="wp-block-cocoon-blocks-timeline timeline-box cf block-box has-border-color has-point-color has-blue-border-color has-blue-point-color cocoon-block-timeline"><div class="timeline-title">開発環境を設定</div><ul class="timeline">
<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step1</div><div class="timeline-item-content cf"><div class="timeline-item-title">コマンドプロンプトで開発環境を調べる</div><div class="timeline-item-snippet"></div></div></li>



<li class="wp-block-cocoon-blocks-timeline-item timeline-item cf"><div class="timeline-item-label">Step2</div><div class="timeline-item-content cf"><div class="timeline-item-title">chromeやXcode、Android Studioをインストールする</div><div class="timeline-item-snippet">
<p></p>
</div></div></li>
</ul></div>



<p><strong>インストールしたものの、アプリとして使用できることとは別の話</strong>です。</p>



<p>ここから、開発環境を構築していきます。</p>



<p>初めに、<strong>コマンドプロンプトに以下を入力</strong>してください。</p>



<div class="hcb_wrap"><pre class="prism undefined-numbers lang-plain"><code>flutter doctor</code></pre></div>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="924" src="https://alicia-ing.com/wp-content/uploads/2023/10/flutter-doctor.webp" alt="Androidでのerror" class="wp-image-3928" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/flutter-doctor.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-doctor-300x144.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-doctor-1024x493.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-doctor-768x370.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-doctor-1536x739.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>表示されるものは次の３つです。</p>



<p>画像の場合、Androidの開発が整ってなくて、<br><strong>Visual Studioも不十分</strong>だということです。</p>



<figure class="wp-block-table aligncenter"><div class="scrollable-table"><table><tbody><tr><td class="has-text-align-center" data-align="center">[√]</td><td class="has-text-align-center" data-align="center">OK</td></tr><tr><td class="has-text-align-center" data-align="center">[×]</td><td class="has-text-align-center" data-align="center">NG</td></tr><tr><td class="has-text-align-center" data-align="center">[!]</td><td class="has-text-align-center" data-align="center">NG</td></tr></tbody></table></div></figure>



<p>Androidでエミュレートや実機でデバックしたい場合は、<br><strong>Android Studioのインストールが必要</strong>です。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>Androidの端末で動かす方法を紹介しています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/programming/flutter/android-emulator/" title="【Flutter】VScodeでAndroidエミュレータ起動" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2023/11/android-emulator-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Flutter】VScodeでAndroidエミュレータ起動</div><div class="blogcard-snippet internal-blogcard-snippet">AndroidアプリはAndroid Studioのインストール、Amdroid SDKが必要で、Android toolchaiの認識も同時に必須です。エミュレータの違法と聞いたことがあるかもしれませんが、エミュレータ自体は合法です。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2025.08.11</div></div></div></div></a>
</div>



<div class="wp-block-cocoon-blocks-tab-caption-box-1 tab-caption-box block-box has-border-color has-light-green-border-color not-nested-style cocoon-block-tab-caption-box" style="--cocoon-custom-border-color:#8bc34a"><div class="tab-caption-box-label block-box-label box-label fab-apple"><span class="tab-caption-box-label-text block-box-label-text box-label-text">WindowsでiOS開発するには？</span></div><div class="tab-caption-box-content block-box-content box-content">
<p>iOSの開発に必要なXcodeはWindowsで使えず、AppStoreに出品できないです。<br>要するに、<strong>WindowsでiPhoneやiPadのアプリは開発、配布・販売は不可能</strong>です。</p>



<p>日本はスマホはiPhone、タブレットはiPad一強なので、<strong>アプリ開発はMacが必要</strong>になります。</p>



<div class="wp-block-cocoon-blocks-micro-text micro-text micro-copy micro-top"><span class="micro-text-content micro-content"><span class="micro-text-icon micro-icon fab-info-circle"></span>クリエイティブなことには、macが必要か書いています。</span></div>



<div class="wp-block-cocoon-blocks-blogcard blogcard-type bct-together">

<a target="_self" href="https://alicia-ing.com/life/compare-windows-mac/" title="【Mac離れ】クリエイターや開発者はMacに満足しないのか？" class="blogcard-wrap internal-blogcard-wrap a-wrap cf"><div class="blogcard internal-blogcard ib-left cf"><div class="blogcard-label internal-blogcard-label"><span class="fa"></span></div><figure class="blogcard-thumbnail internal-blogcard-thumbnail"><img loading="lazy" decoding="async" width="160" height="90" src="https://alicia-ing.com/wp-content/uploads/2022/11/compare-windows-mac-160x90.webp" class="blogcard-thumb-image internal-blogcard-thumb-image wp-post-image" alt="" srcset="https://alicia-ing.com/wp-content/uploads/2022/11/compare-windows-mac-160x90.webp 160w, https://alicia-ing.com/wp-content/uploads/2022/11/compare-windows-mac-120x68.webp 120w, https://alicia-ing.com/wp-content/uploads/2022/11/compare-windows-mac-320x180.webp 320w" sizes="(max-width: 160px) 100vw, 160px" /></figure><div class="blogcard-content internal-blogcard-content"><div class="blogcard-title internal-blogcard-title">【Mac離れ】クリエイターや開発者はMacに満足しないのか？</div><div class="blogcard-snippet internal-blogcard-snippet">クリエイターや開発者はMac離れがささやかれていますが、イラスト（クリスタ）、プログラミング、動画編集などWindows、Macユーザーは等しくいます。PCシェア率はWindowsが優勢ですが、iosアプリはmacでしか作れません。</div></div><div class="blogcard-footer internal-blogcard-footer cf"><div class="blogcard-site internal-blogcard-site"><div class="blogcard-favicon internal-blogcard-favicon"><img loading="lazy" decoding="async" src="https://www.google.com/s2/favicons?domain=https://alicia-ing.com" alt="" class="blogcard-favicon-image internal-blogcard-favicon-image" width="16" height="16" /></div><div class="blogcard-domain internal-blogcard-domain">alicia-ing.com</div></div><div class="blogcard-date internal-blogcard-date"><div class="blogcard-post-date internal-blogcard-post-date">2025.04.09</div></div></div></div></a>
</div>
</div></div>



<h4 class="wp-block-heading">UdemyでFlutterを学習</h4>



<p><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2F">Udemy</a>は、オンデマンド式の学習講座です。<br>趣味から実務まで使えるおすすめの講座を紹介します。</p>



<div class="wp-block-cocoon-blocks-tab-box-1 blank-box bb-tab bb-pickup block-box has-border-color has-yellow-border-color">
<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fnzigen-flutter_beginner%2F">Flutterアプリ開発講座(初級編)<br></a>Flutterアプリ開発の初歩から学習できて、<br><strong>Flutter未経験・プログラミング初心者</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-widget%2F">【Flutter】UI開発でよく使うWidget50選</a><br>Flutterで頻出Widgetを紹介している。<br><strong>始めたばかりで機能を覚えたい人</strong>におすすめ</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<ul class="wp-block-list">
<li><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fflutter-bootcamp-with-dart%2F">The Complete Flutter Development Bootcamp with Dart</a><br>GoogleとFlutterチームが共同作成した講座。<br><strong>本格的なFlutterエンジニアになりたい人</strong>におすすめ</li>
</ul>
</div>



<h2 class="wp-block-heading">実演</h2>



<p>Flutterの開発環境を整えたので、初めに戻ります。</p>



<p>VScodeで「<strong>Ctrl + Shift + P</strong>」とコマンド選択してから、<br>「<strong>&gt;Flutter:New Project</strong>」と入力してください。</p>



<p>先ほどは警告文でしたが、<strong>テンプレートが選択できる</strong>ようになっています。</p>



<p>アプリを作りたいので、「<strong>Application</strong>」を選択してプロジェクトを作成してください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="513" src="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-Application.webp" alt="アプリケーション" class="wp-image-3930" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-Application.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-Application-300x80.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-Application-1024x274.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-Application-768x205.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-Application-1536x410.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<p>作成したプロジェクトの配置場所を選択した後、ファイル名を決めてください。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1919" height="520" src="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-application-1.webp" alt="projectを作る" class="wp-image-3929" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-application-1.webp 1919w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-application-1-300x81.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-application-1-1024x277.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-application-1-768x208.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Flutter-application-1-1536x416.webp 1536w" sizes="(max-width: 1919px) 100vw, 1919px" /></figure>



<p>「main.dart」が既に構築されていて、<br><strong>デバックすると冒頭のようなUIボタンで数値が加算される</strong>ようになります。</p>



<p>画像のインフォメンションにあるように、<strong>F5を押すとデバック</strong>ができます。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1920" height="1008" src="https://alicia-ing.com/wp-content/uploads/2023/10/Press-F5.webp" alt="F5を押す" class="wp-image-3931" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/Press-F5.webp 1920w, https://alicia-ing.com/wp-content/uploads/2023/10/Press-F5-300x158.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/Press-F5-1024x538.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/Press-F5-768x403.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/Press-F5-1536x806.webp 1536w" sizes="(max-width: 1920px) 100vw, 1920px" /></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>Your Flutter project is ready! Press F5 to start running</p>
<cite>Visual Studio Code</cite></blockquote>



<p><strong>F5を押してもデバックすることができない</strong>場合は、<br>どの環境でデバックをするか決めていないからです。</p>



<p><strong>ターミナルで「flutter run」</strong>と入力してください。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="115" src="https://alicia-ing.com/wp-content/uploads/2023/10/flutter-run-1024x115.webp" alt="flutter runを実行" class="wp-image-3932" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/flutter-run-1024x115.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-run-300x34.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-run-768x86.webp 768w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-run-1536x172.webp 1536w, https://alicia-ing.com/wp-content/uploads/2023/10/flutter-run.webp 1538w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p><br>その後つなげるデバイス一覧が出てきてきます。<br><strong>いずれか１つのコマンドを選択</strong>してください。</p>



<p>本記事では「2」を選択しています。</p>



<figure class="wp-block-table aligncenter"><div class="scrollable-table"><table><tbody><tr><td class="has-text-align-center" data-align="center">1</td><td class="has-text-align-center" data-align="center">Windows</td></tr><tr><td class="has-text-align-center" data-align="center"><strong>2</strong></td><td class="has-text-align-center" data-align="center"><strong>Chrome</strong></td></tr><tr><td class="has-text-align-center" data-align="center">3</td><td class="has-text-align-center" data-align="center">Edge</td></tr><tr><td class="has-text-align-center" data-align="center">q</td><td class="has-text-align-center" data-align="center">キャンセル</td></tr></tbody></table></div></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1532" height="247" src="https://alicia-ing.com/wp-content/uploads/2023/10/choose-one.webp" alt="chromeを立ち上げる" class="wp-image-3933" srcset="https://alicia-ing.com/wp-content/uploads/2023/10/choose-one.webp 1532w, https://alicia-ing.com/wp-content/uploads/2023/10/choose-one-300x48.webp 300w, https://alicia-ing.com/wp-content/uploads/2023/10/choose-one-1024x165.webp 1024w, https://alicia-ing.com/wp-content/uploads/2023/10/choose-one-768x124.webp 768w" sizes="(max-width: 1532px) 100vw, 1532px" /></figure>



<h2 class="wp-block-heading">まとめ</h2>



<p>スマホアプリは需要が高く、だれでも簡単に作成することができるようになりました。</p>



<p>アプリ開発においてiOSはSwift。<br>AndroidはKotlinが一般的で、案件の多さから２つの言語を学ぶべきとされています。</p>



<p>しかし、Flutterを使えば、iPhone向けAndroid向けの両方のOSのアプリを同時に開発できます。</p>



<p>さらに、FlutterはVisual Stadio Codeのプラグインがあるので、<br>アプリ開発をしたことがない初心者でも作成することができます。</p>



<p>Flutter SDKをインストール、binフォルダをpathに通して、開発環境を設定します。</p>



<p>chromeで動かすには、chromeのインストール。<br>Androidで動かすには、Android Studioのインストール。<br>iOSで動かすには、Xcodeのインストール。</p>



<p>これらが必要になります。</p>



<div class="wp-block-cocoon-blocks-micro-balloon-2 aligncenter micro-balloon micro-top mc-circle micro-copy"><span class="micro-balloon-content micro-content"><strong>Udemyで学習する</strong></span></div>



<div class="wp-block-cocoon-blocks-button-1 aligncenter button-block"><a target="_self" href="https://click.linksynergy.com/deeplink?id=IyOtUnEMtpw&amp;mid=47984&amp;murl=https%3A%2F%2Fwww.udemy.com%2Fcourses%2Fdevelopment%2F" class="btn btn-m btn-shine has-background has-light-green-background-color">Udemy 公式サイト</a></div>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
