By: Niraj Dhungana
Nov 12 2021
Recently I was trying to set up an android emulator to run my react native project. But when I try to run my project I am getting this error “could not compile settings file ”. It took me lots of time to figure out what was going wrong with my project.
Later I found out that the problem is not with my project the actual problem is with the Java version of my computer. BTW I am using Windows PC and bear react native cli to develop my app.
Previously I was using Expo cli and Android Emulator and it was working completely fine because while using expo we don’t need to set up java separately inside our system.
But while working with bare react native cli we need to set up everything on our own. So, if you are getting this same error then I will recommend you guys to uninstall the Java JDK you already have.
And install the Java JDK LTS version. Currently while I am writing this post the LTS version is Java 11. After installing the Java JDK restart your PC so that it can recognize the JAVA_HOME path.
Also you need to set up environment variables like ANDROID_HOME and platform-tools path. If you don’t know how to do that then here is the post which can help you to set up your android environment variables.
I hope you enjoyed reading this post and learned something new. If not then tell me how can I improve. @fsniraj
React Native Multi Select on Long Press - Touchable Opacity.
How to Setup react-native-cli and Android Emulator on Windows
How to Compress or Manipulate Images in React Native Expo
RecyclerListView – React Native Everything You Need to Know
React Native Node JS - Error: Multipart: Boundary not found