1

The app runs with Ubuntu using android studio, it also runs using react-native on my windows 10.

A new app created with react-native init runs fine with ubuntu

but react-native run-android on my current app always returns this:

 Running /home/lance/Android/Sdk/platform-tools/ adb -s 4d00550ff22a318d reverse tcp:8081 tcp:8081 adb server version (32) doesn't match this client (36); killing... * daemon started successfully * Building and installing the app on the device (cd android && ./gradlew installDebug)... 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/android-setup.html (node:5781) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined (node:5781) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. 
  • react-native 0.40
  • Ubuntu 16.10 X64
  • Samsung S4 (Android 5.0)

Any help would be appreciated please.

4
  • does adb devices show your device as properly connected? have you tried installing the apk through adb install? Commented Jan 17, 2017 at 15:47
  • Yes, sorry should have mentioned that. Commented Jan 17, 2017 at 16:25
  • Also there is a space missing in adb -s 4d00550ff22a318dreverse tcp:8081 tcp:8081, although I suppose that in console you are putting it right... you might try cleaning the project cd android && ./gradlew clean and then build again. In any case, from the console output you posted, I cannot see any helpful error message, so no more ideas. Commented Jan 18, 2017 at 9:28
  • yes it is right in console. It says ./gradlew: command not found. However I can clean through android studio but does not change the error. Commented Jan 18, 2017 at 9:35

1 Answer 1

4

Fixed by adding execution permission to gradelew.

In terminal, in react-native project folder, run

chmod +x android/gradlew

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.