이런저런 IT 이야기
article thumbnail
반응형

이전에 Flutter Doctor실행시 Device부분은 신경쓰지 말라고 한 부분을 여기서 한번 다루겠습니다.

아래와 같이 flutter emulators 명령어를 입력하면 

$ flutter emulators
2 available emulators:

apple_ios_simulator • iOS Simulator      • Apple  • ios
Pixel_3a_XL_API_27  • Pixel 3a XL API 27 • Google • android

To run an emulator, run 'flutter emulators --launch <emulator id>'.
To create a new emulator, run 'flutter emulators --create [--name xyz]'.

You can find more information on managing emulators at the links below:
  https://developer.android.com/studio/run/managing-avds
  https://developer.android.com/studio/command-line/avdmanager

 

위와 같이 표시되는데요. 전 이미 emulator 연결한 적이 있어서 저렇게 표시됩니다.

처음 사용하시는 분들은 emulator를 먼저 만드셔야합니다. [iOS & Android Emulator 만들고 Flutter 연동 하기]

AOS & iOS Emulator를 실행하려면 다음과 같이 명령어를 입력하세요.

$ flutter emulators --launch apple_ios_simulator
$ flutter emulators --launch Pixel_3a_XL_API_27

 

아래와 같이 emulator가 실행됩니다.

그럼 프로젝트안(폴더안)에서 console로 flutter앱을 실행해 보겠습니다.

1. 안드로이드

% flutter run                                   
Multiple devices found:
Android SDK built for x86 (mobile) • emulator-5554                        • android-x86 • Android 8.1.0 (API 27)
(emulator)
iPhone 11 (mobile)                 • 39B40C55-7991-4AAD-8FA9-FCEFDAE5C397 • ios         •
com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
[0]: Android SDK built for x86 (emulator-5554)
[1]: iPhone 11 (39B40C55-7991-4AAD-8FA9-FCEFDAE5C397)
Please choose one: [0|1]: 0
Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling
software rendering with "--enable-software-rendering".

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        42.1s
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
Installing build/app/outputs/flutter-apk/app.apk...                 4.5s
Waiting for Android SDK built for x86 to report its views...          8ms
Syncing files to device Android SDK built for x86...               583ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
An Observatory debugger and profiler on Android SDK built for x86 is available at:
http://127.0.0.1:58624/CtPpNZXbP24=/
I/Choreographer( 6543): Skipped 712 frames!  The application may be doing too much work on its main thread.
D/EGL_emulation( 6543): eglMakeCurrent: 0xd8e3f700: ver 3 0 (tinfo 0xd9e7fb10)
D/EGL_emulation( 6543): eglMakeCurrent: 0xd8e3eb00: ver 3 0 (tinfo 0xdba03e70)

2. 아이폰

% flutter run
Multiple devices found:
Android SDK built for x86 (mobile) • emulator-5554                        • android-x86 • Android 8.1.0 (API 27)
(emulator)
iPhone 11 (mobile)                 • 39B40C55-7991-4AAD-8FA9-FCEFDAE5C397 • ios         •
com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
[0]: Android SDK built for x86 (emulator-5554)
[1]: iPhone 11 (39B40C55-7991-4AAD-8FA9-FCEFDAE5C397)
Please choose one: [0|1]: 


Please choose one: [0|1]: 1

Launching lib/main.dart on iPhone 11 in debug mode...
 
Running Xcode build...                                                  
 └─Compiling, linking and signing...                        20.7s
Xcode build done.                                           43.9s
Waiting for iPhone 11 to report its views...                         5ms
Syncing files to device iPhone 11...                               445ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h Repeat this help message.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
An Observatory debugger and profiler on iPhone 11 is available at: http://127.0.0.1:58716/n5-qL82s0jo=/

 

화면에 나온 결과는 다음과 같습니다.

 

자 개발 준비가 되었네요.

반응형
profile

이런저런 IT 이야기

@이런저런 IT 이야기

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!

profile on loading

Loading...

검색 태그