离子电容器 运行 android --device TARGET_ID 应用程序无法在我的 phone 上打开

ionic capacitor run android --device TARGET_ID Application not opening on my phone

我正在尝试 运行 我的 android phone 上的离子项目。 USB 调试 ON。终端上没有错误。

这是我正在使用的命令ionic capacitor run android --device TARGET_ID

这是终端上的日志。

Build at: 2022-01-17T08:34:48.302Z - Hash: 5c98884b09c72022 - Time: 10541ms
> capacitor.cmd run android --target 1f693801
[capacitor] √ Copying web assets from www to android\app\src\main\assets\public in 8.69s
[capacitor] √ Creating capacitor.config.json in android\app\src\main\assets in 1.65ms
[capacitor] (node:3840) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at D:\Practise\ionic\sgmsls\node_modules\tslib\package.json.
[capacitor] Update this package.json to use a subpath pattern like "./*".
[capacitor] (Use `node --trace-deprecation ...` to show where the warning was created)
[capacitor] √ copy android in 8.77s
[capacitor] √ Updating Android plugins in 19.41ms
[capacitor] [info] Found 4 Capacitor plugins for android:
[capacitor]        @capacitor/app@1.0.7
[capacitor]        @capacitor/haptics@1.1.3
[capacitor]        @capacitor/keyboard@1.2.0
[capacitor]        @capacitor/status-bar@1.0.6
[capacitor] √ update android in 223.01ms
[capacitor] √ Running Gradle build in 13.18s
[capacitor] √ Deploying app-debug.apk to 1f693801 in 5.39s

但是我的 phone 上没有安装或打开任何应用程序。


我用另一种方法试过了。 ionic capacitor run 和 select android。选择我的设备。

有时其他具有相同包 ID 的应用程序会产生问题, 从设置中检查您的应用程序列表,看看您是否有任何其他具有相同捆绑包 ID 的应用程序。或者只是尝试重新启动这两个设备。机器和手机。

也试试无线调试:

如果您的机器和移动设备在同一个网络 (wifi) 上,请尝试使用以下命令执行这些步骤:

  1. adb tcpip 5555
  2. adb connect <your-device-ip>:5555 您可以从设备的 wifi 选项中获取设备 IP。
  3. ionic cap run android -l --external