Is React Native 0.63.3 Android can't be run on Mac Mini M1?

Viewed 28

My goal is to run an old project. It uses React Native 0.63.3. This is the repository

What I've did:

  1. Setup the environment by following the docs for 0.63
    1. Installed Android Studio a month ago.
    2. did $ brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
    3. did not do $ brew install node because it is already installed.
    4. did $ brew install watchman
    5. Installed Android SDK Platform 29 on Android Studio.
    6. Installed Google APIs ARM 64 v8a System Image under the Android 10 (Q) entry because I use Mac Mini M1 instead of Google APIs Intel x86 Atom System Image not documented on the docs for 0.63
    7. Installed Android SDK Build-Tools 29.0.2 on Android Studio.
    8. Added environment to ~/.zprofile and did $ source ~/.zprofile
      eval "$(/opt/homebrew/bin/brew shellenv)"
      export ANDROID_HOME=/Volumes/T7Touch/Library/Android/sdk
      export PATH=$PATH:$ANDROID_HOME/emulator
      export PATH=$PATH:$ANDROID_HOME/tools
      export PATH=$PATH:$ANDROID_HOME/tools/bin
      export PATH=$PATH:$ANDROID_HOME/platform-tools
      export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
      
      JAVA_HOME is not documented on the docs for 0.63, this is to fix cd android && ./gradlew clean issue

Then, I tried to run it by $ npm run android

However, it throws an error

...

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4m 39s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
0 Answers
Related