Ionic失败要构建和部署apk到物理设备

时间:2018-04-17 11:21:57

标签: android node.js angular ionic-framework ionic2

我正在尝试使用离子2构建我在其他设备和计算机上测试的应用程序。我不断收到此错误,然后构建完成并部署应用程序,即使它不是。

    (node:11125) UnhandledPromiseRejectionWarning: Error: /Users/kieran/Desktop/finalyearproject/frontendrest/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> java.io.IOException: Could not delete path '/Users/kieran/Desktop/finalyearproject/frontendrest/platforms/android/app/build/intermediates/assets/debug/www/index.html'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
    at ChildProcess.whenDone (/Users/kieran/Desktop/finalyearproject/frontendrest/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:11125) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11125) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

[OK] Your app has been deployed.
     Did you know you can live-reload changes from your app with --livereload?

MacOSs-MacBook-Pro:frontendrest kieran$

1 个答案:

答案 0 :(得分:0)

有时候我遇到类似的问题。

  1. 只需删除路径中的中间件文件夹:
  2. /用户/基兰/桌面/ finalyearproject / frontendrest /平台/机器人/应用程序/生成/中间体

    1. 杀死' java'任务管理器中的过程。
相关问题