Use Java included with Android Studio to build React Native

When building for Android with React Native, Java must be installed in the environment.

The major one is Java distributed by Oracle. But Android Studio ships with the Open JDK instead.

Use Java included in Android Studio to build React Native because it will be less troublesome to combine with Android Studio and you will not have to worry about changing the license of Oracle Java [^ 1]. ..

[^ 1]: License changed for "Oracle Java" -Free use is for personal development, testing, and demo purposes only .html)

environment

procedure

Describe as follows in .bash_profile.

export PATH=$PATH:/Applications/"Android Studio.app"/Contents/jre/jdk/Contents/Home/bin
export JAVA_HOME=/Applications/"Android Studio.app"/Contents/jre/jdk/Contents/Home

reference

Use the JDK used in Android Studio in the terminal https://qiita.com/tsumuchan/items/43a55789f1cf213611cc

Recommended Posts

Use Java included with Android Studio to build React Native
Source to display character array with numberPicker in Android studio (Java)
Java to C and C to Java in Android Studio
How to use ExpandableListView in Android Studio
Using Native UI Component with React Native (Android version)
How to use Java framework with AWS Lambda! ??
I want to use java8 forEach with index
How to use Java API with lambda expression
How to write React Native bridge ~ Android version ~
Build Java with Wercker
[Android Studio] How to change TextView to any font [Java]
[Android Studio] [Java] How to fix the screen vertically
How to use Truth (assertion library for Java / Android)
[Android Studio] I want to use Maven library on Android
How to build Java development environment with VS Code
Build Java program development environment with Visual Studio Code
How to take a screenshot with the Android Studio emulator
[Java] How to use Map
[Java] How to use Map
How to use trained model of tensorflow2.0 with Kotlin / Java
Java to play with Function
How to use java Optional
Refer to C ++ in the Android Studio module (Java / kotlin)
How to use java class
[Java] How to use Optional ②
[Java] How to use removeAll ()
[Java] How to use string.format
How to use Java Map
Connect to DB with Java
Connect to MySQL 8 with Java
[java] Reasons to use static
How to make an app using Tensorflow with Android Studio
Use native code on Android
When you want to implement Java library testing in Spock with multi-module in Gradle in Android Studio 3
How to use Java variables
Use SpatiaLite with Java / JDBC
[Java] How to use Optional ①
Build WebAPP development environment with Java + Spring with Visual Studio Code
How to use PlantUML with Visual Studio Code (created on October 30, 2020)
Android: How to deal with "Could not determine java version from '10 .0.1'"
I tried to make an Android application with MVC now (Java)
How to call with One Touch (without confirmation) on Android (Java)
Use PlantUML with Visual Studio Code
How to use Java HttpClient (Get)
Build a Java project with Gradle
Java to learn with ramen [Part 1]
Use java with MSYS and Cygwin
Use Microsoft Graph with standard Java
[Java] Points to note with Arrays.asList ()
How to use Java HttpClient (Post)
[Java] How to use join method
Use Azure Bing SpellCheck with Java
Dare to challenge Kaggle with Java (1)
Use JDBC with Java and Scala.
[Processing × Java] How to use variables
I tried to interact with Java
Use Java 11 with Google Cloud Functions
How to use mssql-tools with alpine
Java build with mac vs code
[Android Studio] [Java] Learning memos & links
[Java] How to use LinkedHashMap class