Configure React Native Android Development Environment Summary 1, uninstall Android Studio, execute the following command on the terminal (terminal):
- Rm-rf/applications/android\ Studio.app
- RM-RF ~/library/preferences/androidstudio*
- RM ~/library/preferences/com.google.android.studio.plist
- RM-RF ~/library/application\ support/androidstudio*
- RM-RF ~/library/logs/androidstudio*
- RM-RF ~/library/caches/androidstudio*
2. Delete Projects
- RM-RF ~/androidstudioprojects
3. Delete Gradle
- RM-RF ~/.gradle
4. Uninstall Android Virtual Devices (AVDs) and *.keystore. Note: If other ides are needed, do not remove
- RM-RF ~/.android
5. Remove the Android SDK Tools Note: Do not delete if other Ides are needed
RM-RF ~/library/android*
6.
when installing Android studio for the first time pop-up unable to access Android SDK add-on list because your PC does not have an SDK and you download Android studio without SDK;
As shown:
Workaround: Found in the directory you installed: Bin\idea.properties Open this file to add a line at the end of Disable.android.first.run=true, if you can't open this file, You can download the installation EditPlus tool or the Sublime_text tool, open the modification with the tool, if it is too troublesome, it is easy to open with txt. Environment construction
The Android app is developed in the Java language
- Download the JDK (Java development package),
- Install JDK when download is complete
- To configure a Java environment variable:
Android Development Environment Building
Android Studio installation
Android Studio is the official Ide,android studio that developed Android, and I downloaded the integration (Android SDK) version, which was installed after download.
Android SDK Download
The Android SDK is a development kit developed for Android.
Open Android Studio,
Android.png
Click on the button below to access the Android SDK Manager interface
Android Manager.png
Download the following resources:
- Android SDK build-tools Version 23.0.1
- Android 6.0 (API 23)
- Android Support Repository
Paste_image.png
Paste_image.png
Android SDK environment variable settings
- Refer to Setting the Java environment variable to open the. Bash_profile steps
- Open Android Studio and click SDK Manager in the menu bar
SDK Manager icon
You can view the installation path for the Android SDK
Assign the installation path of the SDK found in the previous step to Android_home, and copy the following to the. bash_profile
export ANDROID_HOME=查找到到sdk路径export PATH=${PATH}:${ANDROID_HOME}/tools export PATH=${PATH}:${ANDROID_HOME}/platform-tools
On the command line, enter:
$source ~/.bash_profile
- On the command line, enter:
$ adb
(Verify that the Android SDK environment variable is set successfully)
react-native--on Mac configuration react native Android development environment Drainage PIT summary