Im getting this error when trying to run a react-native up exception in thread main unknown exception anyone to help
17 AnswersNew Answer
17 AnswersNew Answer
Sorry Gordon, I can't help. I don't use Android Studio
Javier Felipe Toribio Thanks for your reply.
Alright, from the error message, you need an Android development environment. Follow the tutorials on this page: https://reactnative.dev/docs/environment-setup Go through the Expo CLI installation process. When testing your app, use a real Android device to scan the QR code to run the app.
Development OS: Windows? Target OS: Android? Have you done step 3 and 4? Configure ANDROID_HOME environment variable Add platform-tools to Path This guy says in Jan 2020 that he has same problem as you, he solved by uninstalling and reinstalling Java https://stackoverflow.com/questions/59728755/command-failed-gradlew-bat-appinstalldebug-preactnativedevserverport-8081 `Turns out I had a problem with my Java. I uninstall JDK and JRE and reinstall the latest version and it worked out for me.` The Java JDK and JRE version must be latest.
Not sure, havn't installed Java IDE on my computer. Danijel Ivanović, do you know about JRE version?
calvin Don't worry, a Java expert will come up. Just in case Danijel is busy, let me find one more Java expert I know. Javier Felipe Toribio Is there something you can share with us, regarding JRE version, especially for Android Studio?
What's the exception?
Why is Gradle involved? Which tutorial are you following? Can you give me a link to examine?
Have your been solved?
Danijel Ivanović must have missed my tag yesterday Hello Danijel, have you used ReactNative with ReactNative CLI? Any chance you can help this asker? Gordon Sorry my friend, I didn't work with. calvin Maybe here you can find something useful : • https://reactnative.dev/docs/0.5/getting-started
How do I post an image here
Here is the error: Error failed to install the app. Make sure you have the Android development environment set up: https://reactnative Dev/docs/getting-started.html#android-development-environment. run cli with --verbose flag for more details. Error command failed: gradlew.bat app: installDebug-preactnativedevserverport=8081 Exception in thread "main" java.net.connectexception: connection timed out: connect
Yah I know that I was trying to use react-native with Android studio because expo has some limitations and I did go through the tutorials on the page and did everything that was asked but it's still giving me an error I think it's something to do with gradle
https://reactnative.dev/docs/environment-setup then you go to react-native cli quickstart
I already have Java 14 installed maybe the problem is the jre but don't they come as a package?
When I googled it it seems Java and jre version are the same
Learn Playing. Play Learning
Send us a message