简体   繁体   中英

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

I'm trying to run an ionic project on my android phone. The usb debugging is ON . There are no errors on the terminal.

This is the command I'm using ionic capacitor run android --device TARGET_ID

This is the log on the terminal.

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

But no application is installed or opened on my phone.


I've tried this with another way. ionic capacitor run and select android . The choose my device.

Sometime other application with same bundle ID create problems, Check your applications list from settings and see if your have any other application withs same bundle ID. or just try to restart both devices. machine and mobile.

Also Try wireless debugging:

If your machine and your mobile device is on same network(wifi) try these steps with command:

  1. adb tcpip 5555
  2. adb connect <your-device-ip>:5555 device IP you can get from wifi options of your device.
  3. ionic cap run android -l --external

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM