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?
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.
Today we're releasing React Native v0. 66 for Android 12 and iOS 15 support alongside fixes and general updates.
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.
Change the distribution url in:
android/gradle/wrapper/gradle-wrapper.properties
from https
to http
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With