Ionic - 尝试在设备上 运行 时出现错误 "no native targets found"

Ionic - Error "no native targets found" showing up when trying to run on the device

我已经设法通过 ADB 使用 TCP 和 USB 模式连接到设备。但 Ionic 似乎未能检测到该设备。 NPM 版本为 8.3.1,Capacitor 版本为 3.3.4。 @capacitor/core 和@capacitor/cli 都安装了。我曾在 Ionic 的其他社区站点中寻找解决方案,其中 none 正在提供帮助。

原来我没有在全局或本地为 ANDROID_HOME 设置 Android SDK 路径。我也在研究 Flutter,但没有遇到这样的问题。