Click here to Skip to main content
14,271,310 members
Rate this:
Please Sign up or sign in to vote.
-----Environment---------------

OS: Windows 10 version 1709

Node: 8.9.1

npm: 5.5.1

react-native-cli: 2.0

react-native: 0.56.0
Nox emulator: 6.0.0.0

Problem description:

It's about running a simple application with the command react-native run-android.

You get the error message that is shown in the following.

"
Scanning folders for symlinks in C:\Users\jmsuarez\ReactNativeProjects\ProyJMInit45\node_modules (107ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Downloading https://services.gradle.org/distributions/gradle-3.5.1-all.zip
....................................................................................................................
Exception in thread "main" javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: SSL peer shut down incorrectly
        at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1517)
        at sun.security.ssl.AppInputStream.available(AppInputStream.java:60)
        at java.io.BufferedInputStream.available(BufferedInputStream.java:399)
        at sun.net.www.MeteredStream.available(MeteredStream.java:170)
        at sun.net.www.http.KeepAliveStream.close(KeepAliveStream.java:85)
        at java.io.FilterInputStream.close(FilterInputStream.java:181)
        at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(HttpURLConnection.java:3128)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:77)
        at org.gradle.wrapper.Download.download(Download.java:44)
        at org.gradle.wrapper.Install$1.call(Install.java:59)
        at org.gradle.wrapper.Install$1.call(Install.java:46)
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
        at org.gradle.wrapper.Install.createDist(Install.java:46)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: javax.net.ssl.SSLException: SSL peer shut down incorrectly
        at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:426)
        at sun.security.ssl.InputRecord.read(InputRecord.java:378)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:947)
        at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:904)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
        at sun.net.www.MeteredStream.read(MeteredStream.java:134)
        at java.io.FilterInputStream.read(FilterInputStream.java:133)
        at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3058)
        at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3052)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:62)
        ... 7 more
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

"

Any contribution or suggestion that helps to solve the problem is welcome.


What I have tried:

I tried done the steps that the error log suggests.

In fact I have the android emulator connected. I can see it using the command adb devices.

I get the same error using both Nox emulator and also the Android Studio´s emulator.
Posted
Updated 20-Aug-18 9:24am
Comments
Josh415 21-Aug-18 9:32am
   
My network connection is very slow. So I downloaded gradle-3.5.1-all.zip manually.

What I need to do with this zip? Where I have to put it in my react-native app?

Do I need to decompress it?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100