Reputation: 652
did adb tcpip 5555
and adb connect ipaddress
. The adb devices
show the device. But when i run the appium server, its showing no android device connected.
The appium python code is
desired_caps = {}
desired_caps['platformName'] = 'Android'
desired_caps['deviceName'] = 'Android'
desired_caps['automationName'] = 'uiautomator2'
desired_caps['udid'] = 'xx.xx.xx.xx:5555'
desired_caps['platformVersion'] = '6.0.1'
desired_caps['appPackage'] = 'PackageName'
desired_caps['appActivity'] = 'activityName'
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
The appium server error is
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
[debug] [ADB] Could not find devices, restarting adb server...
[debug] [ADB] Restarting adb
[debug] [ADB] Killing adb server on port 5037
[debug] [ADB] Getting connected devices...
[debug] [ADB] 0 device(s) connected
Upvotes: 2
Views: 2133
Reputation: 1
I had the same problem. the solution was,
~/sdk/platform-tools
). as the ADB path from where I was connecting the device over wifi(adb connect xx.xx.xx.xx:5555
) was different from the adb under ~/sdk/platform-tools
.<i>capabilities.setCapability("suppressKillServer", true);</i>
in codeUpvotes: 0