Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/195.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cordova构建(Android SDK平台26,Android SDK构建工具26.0.2)_Android_Cordova_Apk_Phonegap_Android Studio 3.0 - Fatal编程技术网

Cordova构建(Android SDK平台26,Android SDK构建工具26.0.2)

Cordova构建(Android SDK平台26,Android SDK构建工具26.0.2),android,cordova,apk,phonegap,android-studio-3.0,Android,Cordova,Apk,Phonegap,Android Studio 3.0,我正在尝试使用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 JD

我正在尝试使用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 Studio。转到首选项->外观和行为->系统设置->Android SDK

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


然后尝试cordova版本。

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

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


然后尝试cordova构建。

也许这会有帮助也许这会有助于获得相同的错误。。。我已经厌倦了。我想我会使用PhoneGap在线构建,它工作得很好…得到相同的错误。。。我已经厌倦了。我想我会使用PhoneGap在线构建,它非常有效。。。