From e2d1bc45207905f60a4ce512fbe4744b6e6585ec Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Tue, 29 Mar 2016 10:56:51 -0700 Subject: [PATCH] Get correct path to adb from Android Studio If adb really isn't found (unsure what conditions would cause that to happen), then `false` will be called which will result in that warning message being displayed instead. Fixes #351 --- react-native/android/publish_android_template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react-native/android/publish_android_template b/react-native/android/publish_android_template index 0fc1ef6b..79823879 100644 --- a/react-native/android/publish_android_template +++ b/react-native/android/publish_android_template @@ -17,7 +17,8 @@ allprojects { apply plugin: 'com.android.library' task forwardDebugPort(type: Exec) { - commandLine 'adb', 'forward', 'tcp:8082', 'tcp:8082' + def adb = android.getAdbExe()?.toString() ?: 'false' + commandLine adb, 'forward', 'tcp:8082', 'tcp:8082' ignoreExitValue true doLast { if (execResult.getExitValue() != 0) {