我在尝试在模拟器或设备中使用离子Cordova运行示例应用程序“选项卡”时遇到问题。
我正在使用Ubuntu 18.04,并已安装java sdk,android studio,node.js和所有内容。我需要一些帮助,因为我可以找到有关此问题的信息。

我收到以下控制台消息:

Skipping build...
Built the following apk(s):
    /home/irene/test/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Using apk: /home/irene/test/platforms/android/app/build/outputs/apk/debug/app-debug.apk
Package name: io.ionic.starter
(node:15016) UnhandledPromiseRejectionWarning: Error: adb: Command failed with exit code 1 Error output:
adb: failed to install /home/irene/test/platforms/android/app/build/outputs/apk/debug/app-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package io.ionic.starter signatures do not match the previously installed version; ignoring!]
    at ChildProcess.whenDone (/home/irene/test/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:15016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15016) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


我的离子信息是:

Ionic:

   ionic (Ionic CLI)  : 4.1.2 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (/home/irene/Android/Sdk/)
   NodeJS            : v8.10.0 (/usr/bin/node)
   npm               : 3.5.2
   OS                : Linux 4.15

最佳答案

[INSTALL_FAILED_UPDATE_INCOMPATIBLE:软件包io.ionic.starter签名与以前安装的版本不匹配;忽略!]


  您的软件包名称现在为“ io.ionic.starter”


您的构建成功,但是您已经安装了具有相同封装名称的apk,因此请在cofig.xml第2行中更改您的应用程序软件包名称

<widget id="app.newapkname" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

10-08 00:16