我正在尝试通过ionic cordova emulate android
我收到以下错误:
Using apk: C:\Users\John\Downloads\dreamhouse-mobile-ionic-master\dreamhouse-mobile-ionic-master\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Package name: io.ionic.starter
(node:8972) UnhandledPromiseRejectionWarning: CordovaError: Error executing "adb -s emulator-5554 install -r "C:\Users\John\Downloads\dreamhouse-mobile-ionic-master\dreamhouse-mobile-ionic-master\platforms\android\app\build\outputs\apk\debug\app-debug.apk"": 'adb' is not recognized as an internal or external command,
operable program or batch file.
我已经阅读了很多有关在系统变量的路径中设置adb以及为adb杀死服务器启动服务器的文章,但是这些解决方案均无效。
当我仅从CMD或GitBash调用adb
时,它表明路径设置正确,并填充了全局选项以及ADB的版本信息。
有什么建议吗?
更新:
我已经重新安装了Android Studio,从PATH系统变量中删除并读取了ADB,然后重新启动。不知道从这里去哪里。
更新(图片):
Failure Log during Ionic Cordova Emulate Android
Example Showing ADB Path is set Correctly
更新:
作为一种解决方法,我使用ionic cordova build android
并将.apk手动拖动到仿真器中。