0
Im getting this error when trying to run a react-native up exception in thread main unknown exception anyone to help
17 Antworten
+ 4
Sorry Gordon, I can't help. I don't use Android Studio
+ 3
Javier Felipe Toribio Thanks for your reply.
+ 2
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.
+ 2
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.
+ 2
Not sure, havn't installed Java IDE on my computer.
Danijel Ivanović, do you know about JRE version?
+ 2
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?
+ 1
What's the exception?
+ 1
Why is Gradle involved? Which tutorial are you following? Can you give me a link to examine?
+ 1
Have your been solved?
+ 1
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
0
How do I post an image here
0
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
0
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
0
https://reactnative.dev/docs/environment-setup then you go to react-native cli quickstart
0
Ok thanks
0
I already have Java 14 installed maybe the problem is the jre but don't they come as a package?
0
When I googled it it seems Java and jre version are the same