am a beginner at ionic .. and am trying to generate the apk from an ionic project .. but unfortunately it failed to be generated.giving this error
Android Studio project detected
ANDROID_HOME=C:\Users\abdel ysf\AppData\Local\Android\sdk JAVA_HOME=C:\Program Files\java\jdk1.8.0_151 studio Subproject Path: CordovaLib Subproject Path: app publishNonDefault is deprecated and has no effect anymore. All variants are now published. [18:51:59] lint finished in 15.14 s Checking the license for package Android SDK Platform 26 in C:\Users\abdel ysf\AppData\Local\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 7s (node:23120) 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 7s at ChildProcess.whenDone (C:\Users\abdel ysf\Desktop\ionic\HelloWorld\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:23120) 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:23120) [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.
the command which i hade used is : ionic cordova build android