Using appium1.8, an error is reported when starting the app:
2018-05-08 17:09:16:890 - [W3C] Encountered internal error running command: Error: [100%] /data/local/tmp/UnicodeIME-debug.apk
2018-05-08 17:09:16:890 - [W3C] /usr/local/lib/node_modules/appium/node_modules/[email protected]@appium-android-ime/bin/UnicodeIME-debug.apk: 1 file pushed. 4.5 MB/s (36795 bytes in 0.008s)
2018-05-08 17:09:16:890 - [W3C] pkg: /data/local/tmp/UnicodeIME-debug.apk
2018-05-08 17:09:16:891 - [W3C] Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
2018-05-08 17:09:16:893 - [W3C] at ADB.executeInstall$ (/usr/local/lib/node_modules/appium/node_modules/[email protected]@appium-adb/lib/tools/apk-utils.js:398:13)
2018-05-08 17:09:16:893 - [W3C] at tryCatch (/usr/local/lib/node_modules/appium/node_modules/[email protected]@babel-runtime/regenerator/runtime.js:67:40)
2018-05-08 17:09:16:894 - [W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/[email protected]@babel-runtime/regenerator/runtime.js:315:22)
2018-05-08 17:09:16:894 - [W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/[email protected]@babel-runtime/regenerator/runtime.js:100:21)
2018-05-08 17:09:16:894 - [W3C] at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/[email protected]@babel-runtime/regenerator/runtime.js:136:37)
2018-05-08 17:09:16:894 - [W3C] at <anonymous>
2018-05-08 17:09:16:895 - [HTTP]<-- POST /wd/hub/session 5005747 ms - 1834
According to the prompt, the error is reported when the apk is installed, the location of the apk. /usr/local/lib/node_modules/appium/node_modules/[email protected]@appium-android-ime/bin/UnicodeIME-debug.apk
报错:INSTALL_FAILED_UPDATE_INCOMPATIBLE
The reason for this prompt is that the signature has changed, and it seems to be upgraded to appium 1.8. The phone has previously installed this app, and the signature is inconsistent. I can't find this app to assist in the mobile interface for a while. The only way to uninstall the app is to install the adb command. Command uninstallation To know the package name of the app, the package name can be queried by the aapt command. The aapt command is in the build-tools/27.0.3/ directory under the ANDROID_HOME directory. You can copy this command to the ANDROID_HOME/tools/ directory, so that the aapt command not found will not be prompted. Find the appt command, you can get the apk registration
Execute the command: aapt dump badging /usr/local/lib/node_modules/appium/node_modules/[email protected]@appium-android-ime/bin/UnicodeIME-debug.apk
you can see the first line
package: name='io.appium.android.ime' versionCode='1' versionName='1.0' platformBuildVersionName='4.4.2-1456859'
Among them, io.appium.android.ime is the package name
Execute adb uninstall io.appium.android.ime to delete the app and then execute the installation
adb install /usr/local/lib/node_modules/appium/node_modules/[email protected]@appium-android-ime/bin/UnicodeIME-debug.apk can be installed successfully, and appium can continue to run normally span