見出し画像

Android Studio + Emulator作成 + Flutterサンプル実行

1. Android Virtual Device の作成

・Android Studioを起動し、"tools" > "ADV Manager"を選択します。

スクリーンショット 2020-10-18 16.11.09

"Create Virtual Device"ボタンを押下

スクリーンショット 2020-10-18 16.13.31

デバイスを選択
 例えば、"Phone">"Nexus 5"を選択し、"Next"ボタンを押下

スクリーンショット 2020-10-18 16.14.41

Systemイメージを選択
 例えば、"API 30"を選択する場合は、"API 30"の右にあるDownloadを押下し、Systemイメージをダウンロードします。

スクリーンショット 2020-10-18 16.18.07

必要なコンポーネントをダウンロードします。

スクリーンショット 2020-10-18 16.18.14

スクリーンショット 2020-10-18 16.19.20

"Finish"ボタンを押下すると元の画面に戻ります。
そして、"Next"ボタンを押下します。

スクリーンショット 2020-10-18 16.19.30

"Finish"ボタンを押下します。

スクリーンショット 2020-10-18 16.24.42

一覧にAndroid Virtual Deviceが追加されます。

スクリーンショット 2020-10-18 16.26.00

2. Android Virtual Device(AVD)の起動

起動するデバイスの"Play"ボタンを押下します。

スクリーンショット 2020-10-18 16.28.35

エミュレータが起動します。

スクリーンショット 2020-10-18 16.31.04

3. Flutter プロジェクトの実行

"sdk gphone x86(mobile)"を選択します。

スクリーンショット 2020-10-18 16.33.12

実行ボタンを押下
 初回のビルドは結構時間がかかります。

スクリーンショット 2020-10-18 16.39.33

Launching lib/main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
✓ Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...
D/HostConnection( 6023): HostConnection::get() New Host Connection established 0xea466c70, tid 6048
D/HostConnection( 6023): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
W/OpenGLRenderer( 6023): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/EGL_emulation( 6023): eglCreateContext: 0xea4665e0: maj 3 min 0 rcv 3
D/EGL_emulation( 6023): eglMakeCurrent: 0xea4665e0: ver 3 0 (tinfo 0xea7bb5d0) (first time)
D/HostConnection( 6023): HostConnection::get() New Host Connection established 0xea467530, tid 6052
D/HostConnection( 6023): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
D/EGL_emulation( 6023): eglCreateContext: 0xea4673e0: maj 3 min 0 rcv 3
Debug service listening on ws://127.0.0.1:57255/EqYI8WVs3Cw=/ws
Syncing files to device sdk gphone x86...
I/Gralloc4( 6023): mapper 4.x is not supported
D/HostConnection( 6023): createUnique: call
D/HostConnection( 6023): HostConnection::get() New Host Connection established 0xea467c30, tid 6052
D/goldfish-address-space( 6023): allocate: Ask for block of size 0x100
D/goldfish-address-space( 6023): allocate: ioctl allocate returned offset 0x3fd0e2000 size 0x2000
D/HostConnection( 6023): HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_async_unmap_buffer GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0 
D/EGL_emulation( 6023): eglMakeCurrent: 0xea4673e0: ver 3 0 (tinfo 0xea7bbe70) (first time)

スクリーンショット 2020-10-18 16.41.34


この記事が気に入ったらサポートをしてみませんか?