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

来源:20-1 Ionic Android App 打包实战操作演示

Turingbei

2018-06-22

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.


写回答

1回答

Parry

2018-06-22

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

0
3
Turingbei
回复
Parry
好的,老师
2018-06-25
共3条回复

快速上手Ionic3多平台开发企业级问答社区

新手可学,独立开发跨iOS/Android/微信平台项目

613 学习 · 750 问题

查看课程