![](/img/trans.png)
[英]Capacitor Device Plugin works on ionic serve, but not on my phone when testing with Android Studio
[英]ionic capacitor run android --device TARGET_ID Application not opening on my phone
我正在尝试在我的 android 手机上运行一个离子项目。 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
但是我的手机上没有安装或打开任何应用程序。
我已经用另一种方式尝试过了。 ionic capacitor run
和 select android
。 选择我的设备。
有时具有相同捆绑 ID 的其他应用程序会产生问题,请从设置中检查您的应用程序列表,看看您是否有任何其他具有相同捆绑 ID 的应用程序。 或者只是尝试重新启动两个设备。 机器和手机。
也尝试无线调试:
如果您的机器和您的移动设备在同一个网络(wifi)上,请使用命令尝试以下步骤:
adb tcpip 5555
adb connect <your-device-ip>:5555
device IP 您可以从设备的 wifi 选项中获取。ionic cap run android -l --external
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.