0
votes

Set my Android path correctly but still the issue is coming.

Code:

AndroidDriver driver;
    DesiredCapabilities cap=new DesiredCapabilities();
    cap.setCapability("deviceName","");
    cap.setCapability(CapabilityType.BROWSER_NAME, "Android");
    cap.setCapability(CapabilityType.VERSION,"5.1.1");
    cap.setCapability("platformName", "Android");
    //cap.setCapability("app", "/data/app/../base.apk");
    cap.setCapability("appPackage", "com...");
    cap.setCapability("appActivity","com...");
    System.out.println("Success 1");
    driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

Apppium console i s: > info: [debug] Setting device id to 03157df33c29520d

info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5) info: [debug] executing cmd: "D:\softwares\Android\android-sdk-windows\platform-tools\adb.exe" -s 03157df33c29520d wait-for-device info: [debug] executing cmd: "D:\softwares\Android\android-sdk-windows\platform-tools\adb.exe" -s 03157df33c29520d shell "echo 'ready'" info: [debug] Starting logcat capture error: Logcat capture failed: spawn "D:\softwares\Android\android-sdk-windows\platform-tools\adb.exe" ENOENT info: [debug] Stopping logcat capture

Please help me ??

1

1 Answers

0
votes

As far as i see You'll need to set ANDROID_HOME in your ~/.bashrc file. In your case you should add the following line:

export ANDROID_HOME=/Applications/AndroidSdk/sdk

Also check first for developer options is on in your device and also you have installed the correct device driver.Also re verify the minimum required capabilities are set.you can also test whether ADB finds your device by command lsusb.