2015-02-11 59 views
-1

info: [37m-->[39m [37mPOST[39m [37m/wd/hub/session[39m [90m{"desiredCapabilities":{"app":"D:\My_ALOHA\Appium\TestProject\apps\demo1.apk","platform":"VISTA","platformVersion":"4.4.3","platformName":"Android","deviceName":"AppiumDemo123","browserName":"","app-package":"com.livestrong.calorietracker","app-activity":"com.livestrong.calorietracker.activities.WelcomeActivity","version":"4.4.2"}}[39m info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, app-package, app-activity, version info: [debug] No appActivity desired capability or server param. Parsing from apk. info: [debug] No appPackage desired capability or server param. Parsing from apk. info: [debug] Using local app from desired caps: D:\My_ALOHA\Appium\TestProject\apps\demo1.apk info: [debug] Creating new appium session 72fe50ca-03c4-4b3d-b3a4-683a47984b62 info: Starting android appium info: [debug] Using fast reset? true info: [debug] Preparing device for session info: [debug] Checking whether app is actually present info: [debug] Checking whether adb is present info: [debug] Using adb from D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe info: Retrieving device info: [debug] Trying to find a connected android device info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server info: [debug] Getting connected devices... error: Error killing ADB server, going to see if it's online anyway info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server info: [debug] Getting connected devices... error: Error killing ADB server, going to see if it's online anyway info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server info: [debug] Getting connected devices... error: Error killing ADB server, going to see if it's online anyway info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server info: [debug] Getting connected devices... error: Error killing ADB server, going to see if it's online anyway info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" kill-server error: Error killing ADB server, going to see if it's online anyway info: [debug] Getting connected devices... info: [debug] executing: "D:\Android\android-sdk-windows (192.168.8.159)\platform-tools\adb.exe" devices info: [debug] Could not find devices, restarting adb server...在Appium服務器中獲取連接錯誤

回答

0

您的appActivity和appPackage功能缺失。請將此添加到您的功能分類中:

capabilities.setCapability("appPackage", packageName); 
capabilities.setCapability("appActivity", activityName); 
0

您以錯誤的格式編寫了活動和軟件包功能。複製並粘貼以下代碼。它應該是「appPackage」或「app-Package」的活動。

capabilities.setCapability(「appPackage」,「com.livestrong.calorietracker」); capabilities.setCapability(「appActivity」,「com.livestrong.calorietracker.activities.WelcomeActivity」);

此外,請確保在手機的開發者模式下打開調試模式,因爲它似乎Android adb無法檢測到您的手機。