출처

필요 도구


  • Node
  • Native Script CLI
  • Android Studio and JDK

Node.js 설치


1
brew install node

또는

https://nodejs.org/ko/ 에서 설치

JDK 설치


1
2
brew tap homebrew/cask-versions
brew install --cask temurin11

Android Studio 설치


https://developer.android.com/studio 에서 설치

환경 변수 설정


.zshrc와 같은 쉘 실행파일에 다음과 같이 설정

1
2
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools

NativeScript CLI 설치


1
npm install -g nativescript

설치가 잘 되었는지 확인


1
ns doctor android

아무런 문제가 검출되지 않으면 설치 완료

→ Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later.

  • sdk manager를 실행시켜 api 레벨 28 이상의 ‘android *.*’ sdk를 설치해준다.

→ You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: ‘>=23 <=31’.

  • sdk manager를 실행시켜 SDK Tools 탭에서 sdk 빌드툴 31버전 이하를 설치해준다.

→ 다른 추가적인 Warning 해결

  • 구글링하면 쉽게 해결 가능하다…