请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

mac 打包安卓app出现这个报错

NDROID_HOME=/usr/local/Caskroom/android-sdk/4333796

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home

studio

Subproject Path: CordovaLib

Subproject Path: app

[16:13:20]  lint finished in 5.82 s


FAILURE: Build failed with an exception.


* Where:

Script '/Users/bei/Desktop/EggoneApp/platforms/android/CordovaLib/cordova.gradle' line: 68



* What went wrong:


A problem occurred evaluating project ':CordovaLib'.


>

No installed build tools found. Install the Android build tools version 19.1.0 or higher.



* 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


(node:65830) UnhandledPromiseRejectionWarning: Error: /Users/bei/Desktop/EggoneApp/platforms/android/gradlew: Command failed with exit code 1 Error output:

FAILURE: Build failed with an exception.


* Where:

Script '/Users/bei/Desktop/EggoneApp/platforms/android/CordovaLib/cordova.gradle' line: 68


* What went wrong:

A problem occurred evaluating project ':CordovaLib'.

> No installed build tools found. Install the Android build tools version 19.1.0 or higher.


* 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/bei/Desktop/EggoneApp/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

    at ChildProcess.emit (events.js:180:13)

    at maybeClose (internal/child_process.js:936:16)

    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)

(node:65830) 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:65830) [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.


正在回答 回答被采纳积分+3

1回答

Parry 2018-06-22 17:22:40

好像是 gradle 的错误,你用 Android Studio 打包下试试呢,也错误吗?

0 回复 有任何疑惑可以回复我~
  • 提问者 Turingbei #1
    我之前用Android Studio打过包,以前没有用过这个工具。不过好想选择打包还是报错。很奇怪
    回复 有任何疑惑可以回复我~ 2018-06-22 17:25:34
  • Parry 回复 提问者 Turingbei #2
    打包前,要确保 Android Studio 构建的过程没有错误,就像视频里那样。
    回复 有任何疑惑可以回复我~ 2018-06-23 07:23:11
  • 提问者 Turingbei 回复 Parry #3
    好的,老师
    回复 有任何疑惑可以回复我~ 2018-06-25 15:57:11
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信