请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

appium启动代码执行时报错,无法启动app

appium打开Android app的时候报错,执行日志如下,请问是什么原因,如何解决?
[Appium] Welcome to Appium v1.15.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {“capabilities”:{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“b78fb234”,“appium:app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"}]},“desiredCapabilities”:{“platformName”:“Android”,“deviceName”:“b78fb234”,“app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{“platformName”:“Android”,“deviceName”:“b78fb234”,“app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"},null,{“firstMatch”:[{“platformName”:“Android”,“appium:deviceName”:“b78fb234”,“appium:app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"}]}]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1571993698037 (16:54:58 GMT+0800 (GMT+08:00))
[Appium]
[Appium] ======================================================================
[Appium] DEPRECATION WARNING:
[Appium]
[Appium] The ‘automationName’ capability was not provided in the desired
[Appium] capabilities for this Android session
[Appium]
[Appium] Setting ‘automationName=UiAutomator2’ by default and using the
[Appium] UiAutomator2 Driver
[Appium]
[Appium] The next major version of Appium (2.x) will require the
[Appium] ‘automationName’ capability to be set for all sessions on all
[Appium] platforms
[Appium]
[Appium] In previous versions (Appium <= 1.13.x), the default was
[Appium] ‘automationName=UiAutomator1’
[Appium]
[Appium] If you wish to use that automation instead of UiAutomator2, please
[Appium] add ‘automationName=UiAutomator1’ to your desired capabilities
[Appium]
[Appium] For more information about drivers, please visit
[Appium] http://appium.io/docs/en/about-appium/intro/ and explore the
[Appium] ‘Drivers’ menu
[Appium]
[Appium] ======================================================================
[Appium]
[Appium] Appium v1.15.1 creating new AndroidUiautomator2Driver (v1.37.2) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] “alwaysMatch”: {
[debug] [BaseDriver] “platformName”: “Android”,
[debug] [BaseDriver] “appium:deviceName”: “b78fb234”,
[debug] [BaseDriver] “appium:app”: “/Users/zy/工作/JCSample公版1.19/JCSample_2.apk”
[debug] [BaseDriver] },
[debug] [BaseDriver] “firstMatch”: [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: f646f4f8-2397-43b8-886d-d8e6cf358b38
[BaseDriver] Using local app ‘/Users/zy/工作/JCSample公版1.19/JCSample_2.apk’
[debug] [UiAutomator2] Checking whether app is actually present
[ADB] Found 1 ‘build-tools’ folders under ‘/Users/zy/android-sdk-macosx’ (newest first):
[ADB] /Users/zy/android-sdk-macosx/build-tools/29.0.2
[ADB] Using ‘adb’ from ‘/Users/zy/android-sdk-macosx/platform-tools/adb’
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices…
[debug] [ADB] Connected devices: [{“udid”:“b78fb234”,“state”:“device”}]
[AndroidDriver] Using device: b78fb234
[ADB] Using ‘adb’ from ‘/Users/zy/android-sdk-macosx/platform-tools/adb’
[debug] [ADB] Setting device id to b78fb234
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell getprop ro.build.version.sdk’
[debug] [ADB] Current device property ‘ro.build.version.sdk’: 24
[debug] [ADB] Device API level: 24
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Using the alternative activity name detection method because of: Could not find ‘apkanalyzer’ in ["/Users/zy/android-sdk-macosx/platform-tools/apkanalyzer","/Users/zy/android-sdk-macosx/emulator/apkanalyzer","/Users/zy/android-sdk-macosx/tools/apkanalyzer","/Users/zy/android-sdk-macosx/tools/bin/apkanalyzer","/Users/zy/android-sdk-macosx/build-tools/29.0.2/apkanalyzer"]. Do you have Android Build Tools installed at ‘/Users/zy/android-sdk-macosx’?
[ADB] Using ‘aapt’ from ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/aapt’
[ADB] Extracting package and launch activity from manifest
[ADB] Package name: ‘com.juphoon.cloud.sample’
[ADB] Main activity name: ‘com.juphoon.cloud.sample.MainActivity’
[debug] [AndroidDriver] Parsed package and activity are: com.juphoon.cloud.sample/com.juphoon.cloud.sample.MainActivity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 wait-for-device’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell echo ping’
[debug] [AndroidDriver] Pushing settings apk to device…
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package io.appium.settings’
[debug] [ADB] ‘io.appium.settings’ is installed
[debug] [ADB] Getting package info for ‘io.appium.settings’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package io.appium.settings’
[ADB] Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find ‘apkanalyzer’ in ["/Users/zy/android-sdk-macosx/platform-tools/apkanalyzer","/Users/zy/android-sdk-macosx/emulator/apkanalyzer","/Users/zy/android-sdk-macosx/tools/apkanalyzer","/Users/zy/android-sdk-macosx/tools/bin/apkanalyzer","/Users/zy/android-sdk-macosx/build-tools/29.0.2/apkanalyzer"]. Do you have Android Build Tools installed at ‘/Users/zy/android-sdk-macosx’?
[debug] [ADB] The version name of the installed ‘io.appium.settings’ is greater or equal to the application version name (‘2.14.2’ >= ‘2.14.2’)
[debug] [ADB] There is no need to install/upgrade ‘/usr/local/lib/node_modules/appium/node_modules/_io.appium.settings@2.14.2@io.appium.settings/apks/settings_apk-debug.apk’
[debug] [ADB] Getting IDs of all ‘io.appium.settings’ processes
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell ‘pgrep --help; echo $?’’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell pgrep ^appium\.settings$’
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell appops set io.appium.settings android:mock_location allow’
[debug] [Logcat] Starting logcat capture
[UiAutomator2] Server package at ‘/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@4.3.0@appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.3.0.apk’ is not writeable. Will copy it into the temporary location at ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu’ as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[UiAutomator2] Server package at ‘/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@4.3.0@appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk’ is not writeable. Will copy it into the temporary location at ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu’ as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package io.appium.uiautomator2.server’
[debug] [ADB] ‘io.appium.uiautomator2.server’ is not installed
[debug] [ADB] App ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-v4.3.0.apk’ is not installed
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: notInstalled
[debug] [ADB] Checking app cert for /var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-v4.3.0.apk
[ADB] Using ‘apksigner’ from ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/apksigner’
[debug] [ADB] Starting ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/apksigner’ with args ‘[“verify”,"–print-certs","/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-v4.3.0.apk"]’
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-v4.3.0.apk’ is already signed.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package io.appium.uiautomator2.server.test’
[debug] [ADB] ‘io.appium.uiautomator2.server.test’ is installed
[debug] [ADB] Checking app cert for /var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/apksigner’ with args ‘[“verify”,"–print-certs","/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk"]’
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: CN=Android Debug, O=Android, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: 3e4f2ab66d641bbbd363421151755f8b12b66ea37a5db43c52116596b7392a8e
[debug] [ADB] Signer #1 certificate SHA-1 digest: e24fc8971c0aad07d1df6cc62af7fb0d48b45b60
[debug] [ADB] Signer #1 certificate MD5 digest: 5623d53469c7f7147b52ace9d09901eb
[debug] [ADB]
[debug] [ADB] ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk’ is signed with non-default certificate
[ADB] Using ‘zipalign’ from ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/zipalign’
[debug] [ADB] /var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk’ is already zip-aligned. Doing nothing
[debug] [ADB] Signing ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk’ with default cert
[debug] [ADB] Starting ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/apksigner’ with args ‘[“sign”,"–key","/usr/local/lib/node_modules/appium/node_modules/_appium-adb@7.13.0@appium-adb/keys/testkey.pk8","–cert","/usr/local/lib/node_modules/appium/node_modules/_appium-adb@7.13.0@appium-adb/keys/testkey.x509.pem","/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk"]’
[UiAutomator2] Server packages are going to be (re)installed
[UiAutomator2] Full packages reinstall is going to be performed
[debug] [ADB] Uninstalling io.appium.uiautomator2.server
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package io.appium.uiautomator2.server’
[debug] [ADB] ‘io.appium.uiautomator2.server’ is not installed
[ADB] io.appium.uiautomator2.server was not uninstalled, because it was not present on the device
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell ‘ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo ERROR’’
[debug] [ADB] The count of applications in the cache: 3
[ADB] The application at ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-v4.3.0.apk’ is already cached to ‘/data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell pm install -r /data/local/tmp/appium_cache/0cc1725a60a05dbb5d0d09256f2fc6ece7e3b10f.apk’
[ADB] The installation of ‘appium-uiautomator2-server-v4.3.0.apk’ took 3.830s
[debug] [ADB] Install command stdout: Success
[debug] [ADB] Uninstalling io.appium.uiautomator2.server.test
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package io.appium.uiautomator2.server.test’
[debug] [ADB] ‘io.appium.uiautomator2.server.test’ is installed
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell am force-stop io.appium.uiautomator2.server.test’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 uninstall io.appium.uiautomator2.server.test’
[debug] [ADB] ‘adb uninstall io.appium.uiautomator2.server.test’ command output: Success
[ADB] io.appium.uiautomator2.server.test was successfully uninstalled
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell ‘ls -t -1 /data/local/tmp/appium_cache 2>&1 || echo ERROR’’
[debug] [ADB] The count of applications in the cache: 3
[ADB] The application at ‘/var/folders/zs/k7n8fj2d6_q6cd6gxx1gwtb40000gn/T/2019925-4010-1y6fraj.zkcu/appium-uiautomator2-server-debug-androidTest.apk’ is already cached to ‘/data/local/tmp/appium_cache/cd247f042368990c9f33b2d7bf2390d8cf4f4e24.apk’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell pm install -r /data/local/tmp/appium_cache/cd247f042368990c9f33b2d7bf2390d8cf4f4e24.apk’
[ADB] The installation of ‘appium-uiautomator2-server-debug-androidTest.apk’ took 1.890s
[debug] [ADB] Install command stdout: Success
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell pm list instrumentation’
[debug] [UiAutomator2] Instrumentation target ‘io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner’ is available
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 forward tcp:8200 tcp:6790’
[debug] [ADB] Checking app cert for /Users/zy/工作/JCSample公版1.19/JCSample_2.apk
[debug] [ADB] Starting ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/apksigner’ with args ‘[“verify”,"–print-certs","/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"]’
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: O=juphoon
[debug] [ADB] Signer #1 certificate SHA-256 digest: f120d74c564cbc41e22fa6f3d7d2b7e4fd7fd37304280f38231511e80c5a24a3
[debug] [ADB] Signer #1 certificate SHA-1 digest: 129e5945f04ba13c38bc975b14bb0f821e90713b
[debug] [ADB] Signer #1 certificate MD5 digest: 8a7404fa296d23ca2bf51878a8f2e8ec
[debug] [ADB]
[debug] [ADB] ‘/Users/zy/工作/JCSample公版1.19/JCSample_2.apk’ is signed with non-default certificate
[debug] [ADB] /Users/zy/工作/JCSample公版1.19/JCSample_2.apk’ is already zip-aligned. Doing nothing
[debug] [ADB] Signing ‘/Users/zy/工作/JCSample公版1.19/JCSample_2.apk’ with default cert
[debug] [ADB] Starting ‘/Users/zy/android-sdk-macosx/build-tools/29.0.2/apksigner’ with args ‘[“sign”,"–key","/usr/local/lib/node_modules/appium/node_modules/_appium-adb@7.13.0@appium-adb/keys/testkey.pk8","–cert","/usr/local/lib/node_modules/appium/node_modules/_appium-adb@7.13.0@appium-adb/keys/testkey.x509.pem","/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"]’
[debug] [ADB] Getting install status for com.juphoon.cloud.sample
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package com.juphoon.cloud.sample’
[debug] [ADB] ‘com.juphoon.cloud.sample’ is installed
[debug] [ADB] Getting package info for ‘com.juphoon.cloud.sample’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package com.juphoon.cloud.sample’
[ADB] Cannot extract apk info using apkanalyzer. Falling back to aapt. Original error: Could not find ‘apkanalyzer’ in ["/Users/zy/android-sdk-macosx/platform-tools/apkanalyzer","/Users/zy/android-sdk-macosx/emulator/apkanalyzer","/Users/zy/android-sdk-macosx/tools/apkanalyzer","/Users/zy/android-sdk-macosx/tools/bin/apkanalyzer","/Users/zy/android-sdk-macosx/build-tools/29.0.2/apkanalyzer"]. Do you have Android Build Tools installed at ‘/Users/zy/android-sdk-macosx’?
[debug] [ADB] The version name of the installed ‘com.juphoon.cloud.sample’ is greater or equal to the application version name (‘1.19.0’ >= ‘1.19.0’)
[debug] [ADB] There is no need to install/upgrade ‘/Users/zy/工作/JCSample公版1.19/JCSample_2.apk’
[AndroidDriver] Performing fast reset on ‘com.juphoon.cloud.sample’
[debug] [ADB] Getting install status for com.juphoon.cloud.sample
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys package com.juphoon.cloud.sample’
[debug] [ADB] ‘com.juphoon.cloud.sample’ is installed
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell am force-stop com.juphoon.cloud.sample’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell pm clear com.juphoon.cloud.sample’
[debug] [AndroidDriver] Performed fast reset on the installed ‘com.juphoon.cloud.sample’ application (stop and clear)
[debug] [UiAutomator2] Performing shallow cleanup of automation leftovers
[debug] [UiAutomator2] No obsolete sessions have been detected (Error: socket hang up)
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell am force-stop io.appium.uiautomator2.server.test’
[UiAutomator2] Starting UIAutomator2 server 4.3.0
[UiAutomator2] Using UIAutomator2 server from ‘/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@4.3.0@appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.3.0.apk’ and test from ‘/usr/local/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@4.3.0@appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk’
[UiAutomator2] Waiting up to 30000ms for UiAutomator2 to be online…
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s",“b78fb234”,“shell”,“am”,“instrument”,"-w",“io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner”]
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”}
[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[WD Proxy] Got an unexpected response with status undefined: {“code”:“ECONNRESET”}
[debug] [WD Proxy] Matched ‘/status’ to command name ‘getStatus’
[debug] [WD Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“None”,“value”:{“ready”:true,“message”:“UiAutomator2 Server is ready to accept commands”}}
[debug] [UiAutomator2] The initialization of the instrumentation process took 3146ms
[debug] [WD Proxy] Matched ‘/session’ to command name ‘createSession’
[debug] [WD Proxy] Proxying [POST /session] to [POST http://localhost:8200/wd/hub/session] with body: {“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“deviceName”:“b78fb234”,“app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"},“platformName”:“Android”,“deviceName”:“b78fb234”,“app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk",“deviceUDID”:“b78fb234”,“appPackage”:“com.juphoon.cloud.sample”}],“alwaysMatch”:{}}}
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“a7ecf1f0-b1dc-4d75-8406-2926e1075d3e”,“value”:{“sessionId”:“a7ecf1f0-b1dc-4d75-8406-2926e1075d3e”,“capabilities”:{“firstMatch”:[{“platform”:“LINUX”,“webStorageEnabled”:false,“takesScreenshot”:true,“javascriptEnabled”:true,“databaseEnabled”:false,“networkConnectionEnabled”:true,“locationContextEnabled”:false,“warnings”:{},“desired”:{“platformName”:“Android”,“deviceName”:“b78fb234”,“app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk"},“platformName”:“Android”,“deviceName”:“b78fb234”,“app”:"/Users/zy/工作/JCSample公版1.19/JCSample_2.apk",“deviceUDID”:“b78fb234”,“appPackage”:“com.juphoon.cloud.sample”}],“alwaysMatch”:{}}}}
[WD Proxy] Determined the downstream protocol as ‘W3C’
[debug] [WD Proxy] Proxying [GET /appium/device/info] to [GET http://localhost:8200/wd/hub/session/a7ecf1f0-b1dc-4d75-8406-2926e1075d3e/appium/device/info] with no body
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“a7ecf1f0-b1dc-4d75-8406-2926e1075d3e”,“value”:{“androidId”:“48a761886de98a98”,“manufacturer”:“Xiaomi”,“model”:“Mi-4c”,“brand”:“Xiaomi”,“apiVersion”:“24”,“platformVersion”:“7.0”,“carrierName”:"",“realDisplaySize”:“1080x1920”,“displayDensity”:480,“networks”:[{“type”:1,“typeName”:“WIFI”,“subtype”:0,“subtypeName”:"",“isConnected”:true,“detailedState”:“CONNECTED”,“state”:“CONNECTED”,“extraInfo”:"“Juphoon_dev”",“isAvailable”:true,“isFailover”:false,“isRoaming”:false,“capabilities”:{“transportTypes”:“NET_CAPABILITY_SUPL”,“networkCapabilities”:"",“linkUpstreamBandwidthKbps”:1048576,“linkDownBandwidthKbps”:1048576,“signalStrength”:-43,“networkSpecifier”:null,“SSID”:null}}],“locale”:“zh_CN”,“timeZone”:“Asia/Shanghai”}}
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window’
[AndroidDriver] Screen already unlocked, doing nothing
[UiAutomator2] Starting 'com.juphoon.cloud.sample/com.juphoon.cloud.sample.MainActivity and waiting for ‘com.juphoon.cloud.sample/com.juphoon.cloud.sample.MainActivity’
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell am start -W -n com.juphoon.cloud.sample/com.juphoon.cloud.sample.MainActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[debug] [ADB] Waiting up to 20000ms for activity matching pkg: ‘com.juphoon.cloud.sample’ and activity: ‘com.juphoon.cloud.sample.MainActivity’ to be focused
[debug] [ADB] Possible activities, to be checked: ‘com.juphoon.cloud.sample.MainActivity’, ‘com.juphoon.cloud.sample.com.juphoon.cloud.sample.MainActivity’
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell dumpsys window windows’
[debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
[debug] [ADB] Incorrect package and activity. Retrying.
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[debug] [WD Proxy] Proxying [DELETE /] to [DELETE http://localhost:8200/wd/hub/session/a7ecf1f0-b1dc-4d75-8406-2926e1075d3e] with no body
[debug] [WD Proxy] Got response with status 200: {“sessionId”:“a7ecf1f0-b1dc-4d75-8406-2926e1075d3e”,“value”:null}
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 shell am force-stop com.juphoon.cloud.sample’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running ‘/Users/zy/android-sdk-macosx/platform-tools/adb -P 5037 -s b78fb234 forward --remove tcp:8200’
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1571993744081 (16:55:44 GMT+0800 (GMT+08:00))
[debug] [W3C] Encountered internal error running command: Error: Cannot start the ‘com.juphoon.cloud.sample’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: ‘com.juphoon.cloud.sample.MainActivity’ or ‘com.juphoon.cloud.sample.com.juphoon.cloud.sample.MainActivity’ never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting
[debug] [W3C] at ADB.startApp (/usr/local/lib/node_modules/appium/node_modules/_appium-adb@7.13.0@appium-adb/lib/tools/apk-utils.js:153:11)
[HTTP] <-- POST /wd/hub/session 500 46147 ms - 1461
[HTTP]

正在回答 回答被采纳积分+3

1回答

Mushishi 2019-10-25 19:26:04

debug] [W3C] Encountered internal error running command: Error: Cannot start the ‘com.juphoon.cloud.sample’ application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: ‘com.juphoon.cloud.sample.MainActivity’ or ‘com.juphoon.cloud.sample.com.juphoon.cloud.sample.MainActivity’ never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting

你去看一下你启动代码的activity对不对,启动页面的activity

0 回复 有任何疑惑可以回复我~
  • 提问者 连枝 #1
    谢谢老师,我问了下开发,他们说刚打开app的时候,是com.juphoon.cloud.sample.LoginActivity这个先起来,是登录界面,登录后com.juphoon.cloud.sample.MainActivity这个再起来。但是我之前用aapt查看过apk的包名和activity,显示的activity是MainActivity。
    application-icon-480:'res/mipmap-xxhdpi-v4/ic_launcher.png'
    application-icon-640:'res/mipmap-xxxhdpi-v4/ic_launcher.png'
    application-icon-65534:'res/mipmap-mdpi-v4/ic_launcher.png'
    application: label='JCSample' icon='res/mipmap-mdpi-v4/ic_launcher.png'
    launchable-activity: name='com.juphoon.cloud.sample.MainActivity'  label='' icon=''
    uses-permission: name='android.permission.READ_EXTERNAL_STORAGE'
    uses-implied-permission: name='android.permission.READ_EXTERNAL_STORAGE' reason='requested WRITE_EXTERNAL_STORAGE'
    feature-group: label=''
      uses-feature: name='android.hardware.camera'
      uses-feature: name='android.hardware.camera.autofocus'
      uses-feature: name='android.hardware.bluetooth'
      uses-implied-feature: name='android.hardware.bluetooth' reason='requested android.permission.BLUETOOTH permission, and targetSdkVersion > 4'
    现在报错是因为系统自动判断启动代码的activity 为MainActivity,我要怎样手动设置成LoginActivity呢?
    回复 有任何疑惑可以回复我~ 2019-10-30 17:24:13
  • 提问者 连枝 #2
    我启动的时候app是启动成功了的,老师,启动之后就一直在登录页面,同时日志一直在重复刷
    [debug] [ADB] Found package: ‘com.juphoon.cloud.sample’ and fully qualified activity name : ‘com.juphoon.cloud.sample.LoginActivity’
    [debug] [ADB] Incorrect package and activity. Retrying.这段。之后app就闪退了,老师这到底咋回事儿啊
    回复 有任何疑惑可以回复我~ 2019-10-30 17:36:38
  • Mushishi 回复 提问者 连枝 #3
    你配置一个waitactivity
    回复 有任何疑惑可以回复我~ 2019-11-06 08:55:51
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信