Error: packageAndLaunchActivityFromManifest failed

Why I get the error when I record or spy the Katalon sample apk: APIDemos.apk.
I have set the package as “com.hmh.api”, and activity as “com.hmh.api.ApiDemos” in profile.

[debug] e[35m[ADB]e[39m ‘io.appium.settings’ is installed
[debug] e[35m[ADB]e[39m Getting package info for ‘io.appium.settings’
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell dumpsys package io.appium.settings’
e[35m[ADB]e[39m Checking whether aapt is present
e[35m[ADB]e[39m Using aapt from /Users/denisyu/.katalon/tools/android_sdk/platform-tools/aapt
e[35m[ADB]e[39m Error “Command ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/aapt d badging /Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_io.appium.settings@2.11.0@io.appium.settings/apks/settings_apk-debug.apk’ exited with code null” while getting badging info
e[35m[ADB]e[39m Cannot read version codes of ‘/Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_io.appium.settings@2.11.0@io.appium.settings/apks/settings_apk-debug.apk’ and/or ‘io.appium.settings’
e[35m[ADB]e[39m Cannot read version names of ‘/Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_io.appium.settings@2.11.0@io.appium.settings/apks/settings_apk-debug.apk’ and/or ‘io.appium.settings’
[debug] e[35m[ADB]e[39m The current install state of ‘/Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_io.appium.settings@2.11.0@io.appium.settings/apks/settings_apk-debug.apk’ is unknown. Installing anyway
[debug] e[35m[ADB]e[39m Device API level: 23
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 install -r -g /Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_io.appium.settings@2.11.0@io.appium.settings/apks/settings_apk-debug.apk’
[debug] e[35m[ADB]e[39m Install command stdout: [100%] /data/local/tmp/settings_apk-debug.apk
[debug] e[35m[ADB]e[39m /Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_io.appium.settings@2.11.0@io.appium.settings/apks/settings_apk-debug.apk: 1 file pushed. 2.7 MB/s (58640 bytes in 0.021s)
[debug] e[35m[ADB]e[39m pkg: /data/local/tmp/settings_apk-debug.apk
[debug] e[35m[ADB]e[39m Success
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell ps’
[debug] e[35m[ADB]e[39m Device API level: 23
e[35m[AndroidDriver]e[39m Granting android.permission.SET_ANIMATION_SCALE, CHANGE_CONFIGURATION, ACCESS_FINE_LOCATION by pm grant
[debug] e[35m[ADB]e[39m Granting permissions [“android.permission.SET_ANIMATION_SCALE”,“android.permission.CHANGE_CONFIGURATION”,“android.permission.ACCESS_FINE_LOCATION”] to ‘io.appium.settings’
[debug] e[35m[ADB]e[39m Got the following command chunks to execute: [[“pm”,“grant”,“io.appium.settings”,“android.permission.SET_ANIMATION_SCALE”,";",“pm”,“grant”,“io.appium.settings”,“android.permission.CHANGE_CONFIGURATION”,";",“pm”,“grant”,“io.appium.settings”,“android.permission.ACCESS_FINE_LOCATION”,";"]]
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell pm grant io.appium.settings android.permission.SET_ANIMATION_SCALE ; pm grant io.appium.settings android.permission.CHANGE_CONFIGURATION ; pm grant io.appium.settings android.permission.ACCESS_FINE_LOCATION ;’
[debug] e[35m[ADB]e[39m Device API level: 23
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[debug] e[35m[ADB]e[39m Device API level: 23
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell appops set io.appium.settings android:mock_location allow’
[debug] e[35m[Logcat]e[39m Starting logcat capture
e[35m[ADB]e[39m Getting device platform version
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell getprop ro.build.version.release’
[debug] e[35m[ADB]e[39m Current device property ‘ro.build.version.release’: 6.0.1
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell wm size’
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell getprop ro.product.model’
[debug] e[35m[ADB]e[39m Current device property ‘ro.product.model’: ATH-AL00
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell getprop ro.product.manufacturer’
[debug] e[35m[ADB]e[39m Current device property ‘ro.product.manufacturer’: HUAWEI
[debug] e[35m[AndroidDriver]e[39m Parsing package and activity from app manifest
e[35m[ADB]e[39m Using apkanalyzer from /Users/denisyu/.katalon/tools/android_sdk/tools/bin/apkanalyzer
[debug] e[35m[ADB]e[39m Starting ‘/Users/denisyu/.katalon/tools/android_sdk/tools/bin/apkanalyzer’ with args ["-h",“manifest”,“print”,"/Users/denisyu/Katalon/andriodsample/androidapp/APIDemos.apk"]
e[35m[ADB]e[39m Using the alternative activity name detection method because of: Command ‘/Users/denisyu/.katalon/tools/android_sdk/tools/bin/apkanalyzer -h manifest print /Users/denisyu/Katalon/andriodsample/androidapp/APIDemos.apk’ exited with code 1
e[35m[ADB]e[39m Extracting package and launch activity from manifest
[debug] e[35m[AndroidDriver]e[39m Shutting down Android driver
[debug] e[35m[AndroidDriver]e[39m Called deleteSession but bootstrap wasn’t active
[debug] e[35m[Logcat]e[39m Stopping logcat capture
[debug] e[35m[ADB]e[39m Running ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/adb -P 5037 -s 69T7N15915029735 shell am force-stop io.appium.unlock’
[debug] e[35m[AndroidDriver]e[39m Not cleaning generated files. Add clearSystemFiles capability if wanted.
[debug] e[35m[BaseDriver]e[39m Event ‘newSessionStarted’ logged at 1545802943894 (13:42:23 GMT+0800 (China Standard Time))
[debug] e[35m[W3C]e[39m Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Command ‘/Users/denisyu/.katalon/tools/android_sdk/platform-tools/aapt dump badging /Users/denisyu/Katalon/andriodsample/androidapp/APIDemos.apk’ exited with code null; StdErr: dyld: Library not loaded: @rpath/libc++.dylib
[debug] e[35m[W3C]e[39m Referenced from: /Users/denisyu/.katalon/tools/android_sdk/platform-tools/aapt
[debug] e[35m[W3C]e[39m Reason: image not found
[debug] e[35m[W3C]e[39m
[debug] e[35m[W3C]e[39m at ADB.manifestMethods.packageAndLaunchActivityFromManifest (/Users/denisyu/.nvm/versions/node/v8.1.4/lib/node_modules/appium/node_modules/_appium-adb@7.0.0@appium-adb/lib/tools/android-manifest.js:188:9)
e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session e[39me[31m500e[39m e[90m10929 ms - 1399e[39m
e[35m[HTTP]e[39m e[90me[39m

1 Like