Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React-native unable to run-android

Following this: https://facebook.github.io/react-native/docs/getting-started.html , I've created an empty project and am trying to run it by doing: sudo react-native run-android This is what is produced:

Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug...
Downloading https://services.gradle.org/distributions/gradle-2.4-all.zip

Exception in thread "main" javax.net.ssl.SSLHandshakeException: 

sun.security.validator.ValidatorException: PKIX path building failed: 

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

(I can post the rest of the error if that would be useful). Does anyone have any advice?

like image 347
user3738559 Avatar asked May 28 '16 04:05

user3738559


People also ask

How do I fix React Native error?

What you need to do is install a earlier version of Gradle for your project and then rebuild your app. Go to https://developer.android.com/studio/releases/gradle-plugin. Scroll down to the Update Gradle section. Here, you will see a table of Gradle version and Plugin version.

Is React Native compatible with Android?

Today we're releasing React Native v0. 66 for Android 12 and iOS 15 support alongside fixes and general updates.

Can we run React Native without Android Studio?

you don't need Android Studio at all, if you are using react native cli you can install it on your phone and run it there.


1 Answers

Change the distribution url in:

android/gradle/wrapper/gradle-wrapper.properties

from https to http.

like image 58
user1344506 Avatar answered Oct 20 '22 17:10

user1344506