How to set up Android for React-Native without Android Studio but only using the SDK tools?

前端 未结 2 1292
失恋的感觉
失恋的感觉 2021-02-04 17:01

I\'ve read pretty much read every article from google search, watched all the YouTube tutorials and checked out all the StackOverflow questions relating to this but cannot find

2条回答
  •  鱼传尺愫
    2021-02-04 17:44

    Mac Users

    Assuming you already have:

    1. Java JDK 8
    2. nodejs and react-native cli

    Now let's download only command line tools (which is bottom of ) this link

    Follow these steps wisely:

    1. unzip the folder in /opt/andriod directory

    2. export ANDROID_HOME=/opt/android

    3. echo "export ANDROID_HOME=/opt/android" >> ~/.bashrc

    4. /opt/android/tools/bin/sdkmanager "platforms;android-23" "build-tools;23.0.1" "add-ons;addon-google_apis-google-23"

    You are all done.Congrats! if you made it all.Now from RN proj. folder run:

    react-native run-android
    

提交回复
热议问题