2

I am experiencing the following difficulty with the react native application. If someone can help with a solution it's appreciated.

JS server already running. Building and installing the app on the device (cd android && ./gradlew installDebug)...

FAILURE: Build failed with an exception.

  • What went wrong: Failed to load native library 'libnative-platform.so' for Linux i386.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 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

1
  • can you help this? cd android && gradlew clean Commented Aug 27, 2018 at 8:55

2 Answers 2

6

Have tried to delete android/app/build folder and node_modules folder.

after removing them , in your root folder of project run following commands in terminal

npm install --save react-native link react-native run-android 

After still does not work run following commands after running above commands

adb devices adb reverse tcp:8081 tcp:8081 

if web server is not running

react-native start 
Sign up to request clarification or add additional context in comments.

7 Comments

Yeah as you said I removed the node modules as well. After running the react-native link command I got the following. That's good. "rnpm-install info Linking assets to ios project , rnpm-install info Linking assets to android project rnpm-install info Assets have been successfully linked to your project " But the issue is still the same.
second adb reverse tcp:8081 tcp:8081
than start web server react-native start
shake phone to reload app
Thanks. I think I have done that. Many thanks for the good guidance.
|
0

Have you tried official documentation.I think you are trying to run this command before setting up the signing configuration.

4 Comments

Hi Naleen, Thanks for the comment. I haven't done those steps which you have refereed to me. Do we need to do those as well when we are just trying to run the application with react-native. Because earlier time I didn't do those as I can remember.
if you want to install app in device as production so you should complete this step before build.
Ah OK got it. But I was trying to run the application in my phone.
Do you have a problem with running in device in debug mode?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.