Android 构建时的离子错误

Android 构建时的离子错误,android,cordova,ionic-framework,build,ionic3,Android,Cordova,Ionic Framework,Build,Ionic3,我正在尝试为安卓系统构建和应用程序,我用爱奥尼亚制作,我安装了安卓SDK管理器并完成了所有更新,然后安装了安卓Studio, 然后我接着构建了这个应用程序(之前我在爱奥尼亚cordova平台上添加了android) Im运行在64位Windows 7上,支持Ionic 3.20.0和Cordova 8.0.0 下面是git Bash展示的内容: $ ionic cordova build --release android Running app-scripts build: --platfor

我正在尝试为安卓系统构建和应用程序,我用爱奥尼亚制作,我安装了安卓SDK管理器并完成了所有更新,然后安装了安卓Studio, 然后我接着构建了这个应用程序(之前我在爱奥尼亚cordova平台上添加了android) Im运行在64位Windows 7上,支持Ionic 3.20.0和Cordova 8.0.0 下面是git Bash展示的内容:

$ ionic cordova build --release android
Running app-scripts build: --platform android --target cordova
[12:42:03]  build dev started ...
[12:42:03]  clean started ...
[12:42:03]  clean finished in 15 ms
[12:42:03]  copy started ...
[12:42:03]  deeplinks started ...
[12:42:03]  deeplinks finished in 46 ms
[12:42:03]  transpile started ...
[12:42:10]  transpile finished in 6.79 s
[12:42:10]  preprocess started ...
[12:42:10]  preprocess finished in less than 1 ms
[12:42:10]  webpack started ...
[12:42:10]  copy finished in 7.05 s
[12:42:20]  webpack finished in 9.41 s
[12:42:20]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[12:42:21]  sass finished in 1.42 s
[12:42:21]  postprocess started ...
[12:42:21]  postprocess finished in 171 ms
[12:42:21]  lint started ...
[12:42:21]  build dev finished in 17.99 s
> cordova build android --release
Android Studio project detected

ANDROID_HOME=C:\Users\DELL\AppData\Local\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_112
studio
Subproject Path: CordovaLib
Subproject Path: app
[12:42:26]  lint finished in 5.26 s
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Checking the license for package Android SDK Platform 26 in C:\Users\DELL\AppData\Local\Android\android-sdk\licenses
Warning: License for package Android SDK Platform 26 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 26].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.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 3s
(node:6316) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 26].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.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 3s
    at ChildProcess.whenDone (C:\Users\DELL\Desktop\ecrypt\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:6316) 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:6316) [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.

并按如下方式运行sdkmanager:

./sdkmanager --licenses

并接受您未接受的许可证。

错误:未知参数--licenses@lefragan打开androidstudio,选择sdkmanager并安装缺失的组件,这将解决问题
./sdkmanager --licenses