【问题标题】:Cordova build (Android SDK Platform 26, Android SDK Build-Tools 26.0.2)Cordova 构建(Android SDK 平台 26,Android SDK 构建工具 26.0.2)
【发布时间】:2018-04-08 16:31:51
【问题描述】:

我正在尝试使用cordova 构建一个APK。 我开始做:

1) sudo npm install -g cordova

2) cordova create app com.example.hello app

3) cordova platform add android

然后我用了:

cordova requirements

给出这个输出: 检测到 Android Studio 项目

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed 
android: Command failed with exit code ENOENT
Gradle: installed /usr/share/gradle/bin/gradle
(node:27773) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Some of requirements check failed

最后我使用:

cordova build

结果如下:

* 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, Android SDK Build-Tools 26.0.2].
  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

我完全迷路了。任何帮助将不胜感激!

【问题讨论】:

标签: android cordova apk phonegap android-studio-3.0


【解决方案1】:

打开您的 Android Studio。转到首选项 -> 外观和行为 -> 系统设置 -> Android SDK。

在 SDK 平台选项卡中,下载适用于 Android 8.0(API 级别 26)的 SDK 平台,在 SDK 工具选项卡中,下载 Android SDK 平台 - 工具版本 26.0.2。

然后尝试使用 cordova 构建。

【讨论】:

  • 遇到同样的错误...我已经厌倦了。我想我会使用 PhoneGap 在线构建,效果很好......
猜你喜欢
  • 2013-11-13
  • 1970-01-01
  • 2023-03-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-11-16
  • 1970-01-01
  • 2014-09-27
相关资源
最近更新 更多