M1 Mac에서 Android 에뮬레이터를 여는 방법 <패키지 사용 안 함> (Android Studio, Flutter)

M1 Macbook을 사용하고 있는 분은 Flutter의 환경 구축으로 Android 에뮬레이터를 사용할 수 없어 초조했다고 생각합니다.
저도 아직 초보자이므로 여러가지 졸리지만, 잘 부탁드립니다.

M1mac이 아니면 움직이도록 설정되어 있는 전제로 진행합니다.

(귀찮다면 좌절하기 전에 iOS에서 개발을 진행해 버리는 것도 전혀 좋다고 생각합니다.)

M1 Macbook에서는 에뮬레이터를 사용할 수 없다는 점에서 2020년 12월경에 Google이 Android의 데모 조작을 할 수 있는 패키지를 제공했습니다.

그 패키지를 사용하면 Android Emulator라는 앱을 다운로드하고 시작하여 데모 조작을 할 수 있게 되었습니다.

그리고 2021년 3월경에 패키지는 더 이상 필요하지 않습니다. Android Studio에서 에뮬레이터를 시작할 수 있게 되었기 때문입니다.

그 방법을 설명합니다.

먼저 화면 오른쪽 상단에서 AVD Manager를 열고 Create Virtual Device...를 엽니다.



적절하게 선택합니다.

그런 다음 기타 이미지 열로 이동합니다.
이미 다운로드가 완료되었지만 API Level30 주변을 적절하게 선택하십시오.
중요한 것은 ABI가 arm~이 되고 있는 녀석입니다. 이 arm이 붙어 있는 것을 선택하면 M1에서도 사용할 수 있게 되는 것 같습니다. (아직도 작업이 계속됩니다)
다음을 눌러 다운로드를 진행하십시오.


다운로드가 완료되고 열려고 하면, The emulator process for AVD was killed 로 나와 에뮬레이터는 열 수 없습니다.


여기서 API Level이 다운로드한 에뮬레이터와 동일한 것을 사용할 수 있는지 확인해 보세요.


둘째,
./Library/Android/sdk/emulator/darwin-aarch64-replace.sh
darwin-aarch64-replace.sh를 시작하십시오.

시작 방법은 터미널에서 emulator 디렉토리로 이동 한 후,
$ ./darwin-aarch64-replace.sh
ayumu@ayumunomac emulator % ./darwin-aarch64-replace.sh
curl -L https://github.com/google/android-emulator-m1-preview/releases/download/0.2/emulator-darwin-aarch64-0.2-engine-only.zip -o emulator-darwin-aarch64-0.2.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   651  100   651    0     0   2021      0 --:--:-- --:--:-- --:--:--  2021
100 91.8M  100 91.8M    0     0  6882k      0  0:00:13  0:00:13 --:--:-- 9427k
unzip emulator-darwin-aarch64-0.2.zip
Archive:  emulator-darwin-aarch64-0.2.zip
   creating: emulator-darwin-aarch64-0.2/
  inflating: emulator-darwin-aarch64-0.2/NOTICE.csv  
  inflating: emulator-darwin-aarch64-0.2/qsn  
  inflating: emulator-darwin-aarch64-0.2/qemu-img  
   creating: emulator-darwin-aarch64-0.2/lib64/
  inflating: emulator-darwin-aarch64-0.2/lib64/libemugl_common.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/qt/
   creating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/
   creating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/platforms/
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/platforms/libqcocoa.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/styles/
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/styles/libqmacstyle.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/bearer/
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/bearer/libqgenericbearer.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/iconengines/
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/iconengines/libqsvgicon.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqgif.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqwbmp.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqwebp.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqico.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqmacheif.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqjpeg.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqtiff.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqsvg.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqicns.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqtga.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/plugins/imageformats/libqmacjp2.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/qt/lib/
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5CoreAndroidEmu.5.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5PrintSupportAndroidEmu.5.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5SvgAndroidEmu.5.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5WidgetsAndroidEmu.5.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5DBusAndroidEmu.5.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5GuiAndroidEmu.5.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/qt/lib/libQt5NetworkAndroidEmu.5.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/gles_swiftshader/
  inflating: emulator-darwin-aarch64-0.2/lib64/gles_swiftshader/libEGL.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/gles_swiftshader/libGLES_CM.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/gles_swiftshader/libGLESv2.dylib  
   creating: emulator-darwin-aarch64-0.2/lib64/vulkan/
  inflating: emulator-darwin-aarch64-0.2/lib64/vulkan/libMoltenVK.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/vulkan/MoltenVK_icd.json  
  inflating: emulator-darwin-aarch64-0.2/lib64/libshadertranslator.dylib  
  inflating: emulator-darwin-aarch64-0.2/lib64/libOpenglRender.dylib  
  inflating: emulator-darwin-aarch64-0.2/LICENSE  
  inflating: emulator-darwin-aarch64-0.2/darwin-aarch64-replace.sh  
   creating: emulator-darwin-aarch64-0.2/resources/
   creating: emulator-darwin-aarch64-0.2/resources/macroPreviews/
  inflating: emulator-darwin-aarch64-0.2/resources/macroPreviews/Reset_position.mp4  
  inflating: emulator-darwin-aarch64-0.2/resources/macroPreviews/Walk_to_image_room.mp4  
  inflating: emulator-darwin-aarch64-0.2/resources/macroPreviews/Track_vertical_plane.mp4  
  inflating: emulator-darwin-aarch64-0.2/resources/macroPreviews/Track_horizontal_plane.mp4  
  inflating: emulator-darwin-aarch64-0.2/resources/Toren1BD_Decor.png  
  inflating: emulator-darwin-aarch64-0.2/resources/poster.png  
  inflating: emulator-darwin-aarch64-0.2/resources/Toren1BD.mtl  
  inflating: emulator-darwin-aarch64-0.2/resources/Toren1BD_Main.png  
  inflating: emulator-darwin-aarch64-0.2/resources/Toren1BD.posters  
  inflating: emulator-darwin-aarch64-0.2/resources/Toren1BD.obj  
   creating: emulator-darwin-aarch64-0.2/resources/macros/
  inflating: emulator-darwin-aarch64-0.2/resources/macros/Track_vertical_plane  
  inflating: emulator-darwin-aarch64-0.2/resources/macros/Reset_position  
  inflating: emulator-darwin-aarch64-0.2/resources/macros/Track_horizontal_plane  
  inflating: emulator-darwin-aarch64-0.2/resources/macros/Walk_to_image_room  
   creating: emulator-darwin-aarch64-0.2/bin64/
  inflating: emulator-darwin-aarch64-0.2/bin64/fsck.ext4  
  inflating: emulator-darwin-aarch64-0.2/bin64/mkfs.ext4  
  inflating: emulator-darwin-aarch64-0.2/bin64/tune2fs  
  inflating: emulator-darwin-aarch64-0.2/bin64/resize2fs  
  inflating: emulator-darwin-aarch64-0.2/bin64/e2fsck  
  inflating: emulator-darwin-aarch64-0.2/source.properties  
  inflating: emulator-darwin-aarch64-0.2/emulator-check  
  inflating: emulator-darwin-aarch64-0.2/NOTICE.txt  
  inflating: emulator-darwin-aarch64-0.2/android-info.txt  
  inflating: emulator-darwin-aarch64-0.2/perfetto-protozero-protoc-plugin  
   creating: emulator-darwin-aarch64-0.2/qemu/
   creating: emulator-darwin-aarch64-0.2/qemu/darwin-aarch64/
  inflating: emulator-darwin-aarch64-0.2/qemu/darwin-aarch64/qemu-system-aarch64  
  inflating: emulator-darwin-aarch64-0.2/qemu/darwin-aarch64/qemu-system-aarch64-headless  
  inflating: emulator-darwin-aarch64-0.2/mksdcard  
   creating: emulator-darwin-aarch64-0.2/lib/
  inflating: emulator-darwin-aarch64-0.2/lib/waterfall.proto  
  inflating: emulator-darwin-aarch64-0.2/lib/emulator_controller.proto  
  inflating: emulator-darwin-aarch64-0.2/lib/advancedFeaturesCanary.ini  
  inflating: emulator-darwin-aarch64-0.2/lib/hardware-properties.ini  
  inflating: emulator-darwin-aarch64-0.2/lib/advancedFeatures.ini  
  inflating: emulator-darwin-aarch64-0.2/lib/hostapd.conf  
   creating: emulator-darwin-aarch64-0.2/lib/pc-bios/
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/efi-e1000.rom  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/kvmvapic.bin  
   creating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/sl  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/pl  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/modifiers  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/sv  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/da  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/no  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/Makefile  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/ja  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/lv  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/it  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/is  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/cz  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/ru  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/en-gb  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/bepo  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/common  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/pt  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/fr-ch  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/fr-ca  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/mk  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/ar  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/hr  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/pt-br  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/hu  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/nl  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/de  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/fi  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/fr  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/es  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/et  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/lt  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/fo  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/en-us  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/de-ch  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/th  
 extracting: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/nl-be  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/fr-be  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/keymaps/tr  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/multiboot.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/vgabios-stdvga.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/bios.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/vgabios-virtio.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/bios-256k.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/linuxboot_dma.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/linuxboot.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/efi-virtio.rom  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/efi-e1000e.rom  
  inflating: emulator-darwin-aarch64-0.2/lib/pc-bios/vgabios-cirrus.bin  
  inflating: emulator-darwin-aarch64-0.2/lib/snapshot_service.proto  
  inflating: emulator-darwin-aarch64-0.2/lib/emu-original-feature-flags.protobuf  
  inflating: emulator-darwin-aarch64-0.2/lib/snapshot.proto  
  inflating: emulator-darwin-aarch64-0.2/lib/ca-bundle.pem  
  inflating: emulator-darwin-aarch64-0.2/lib/ui_controller_service.proto  
  inflating: emulator-darwin-aarch64-0.2/emulator  
rm: ./qemu-img: No such file or directory


이것으로
emulator-darwin-aarch64-0.2.zip
가 다운로드되었습니다. 이 파일을 클릭하면 emulator-darwin-aarch64-0.2
라는 파일이 생성됩니다.

emulator-darwin-aarch64-0.2를 열고 모든 내용을 emulator 파일로 옮깁니다.



그리고 AVD Manager를 열면



<참고 기사>
htps : // 기주 b. 코 m / 오오 g / 앙 d 로이 d 에무와 rm 1-p ゔ ぃ w / 이스 s / 34

좋은 웹페이지 즐겨찾기