0

i am using nodejs --version v0.10.25 and npm --version 5.6.0 i also installed all the required things like node, npm ,also installed cli of react native ,android sdk, also add Android sdk into PATH, using virtual device and set device ID to udev rules. And my file structure is : drwxrwxr-x 5 aspl aspl 4096 Feb 16 15:17 android -rw-rw-r-- 1 aspl aspl 1184 Feb 16 15:17 App.js -rw-rw-r-- 1 aspl aspl 43 Feb 16 15:17 app.json -rw-rw-r-- 1 aspl aspl 119 Feb 16 15:17 index.android.js drwxrwxr-x 622 aspl aspl 20480 Feb 16 15:17 node_modules -rw-rw-r-- 1 aspl aspl 448 Feb 16 15:17 package.json -rw-rw-r-- 1 aspl aspl 266340 Feb 16 15:17 package-lock.json drwxrwxr-x 2 aspl aspl 4096 Feb 16 15:17 tests still i got the error:

Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error


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
Aspl Test
  • 133
  • 1
  • 10

1 Answers1

0

The issue is due to not setting up JAVA_HOME. Set it with steps from this link .

export JAVA_HOME="/usr/lib/jvm/java-8-openjdk"
export PATH=$JAVA_HOME/bin:$PATH

save above code to your save that to your .bashrc file and run again

Suyog K.C
  • 682
  • 9
  • 20
  • try cleaning the project "cd android && ./gradlew clean && cd .." and confirm if jdk is in path by "echo $JAVA_HOME" – Suyog K.C Feb 19 '18 at 05:52
  • ./gradlew: line 164: /usr/lib/jvm/jdk1.8.0_161/bin/java: cannot execute binary file: Exec format error ./gradlew: line 164: /usr/lib/jvm/jdk1.8.0_161/bin/java: Success – Aspl Test Feb 19 '18 at 11:01
  • It maybe that you have installed 32-bit JDK environment in 64-bit Linux system. Try and fix the JDK environment according to you system. – Suyog K.C Feb 19 '18 at 15:09