Reputation: 185
I'm a beginner in ionic .. and am trying to generate the apk from an ionic project .. but unfortunately it failed to be generated giving me 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.
The command I used is : ionic cordova build android
Upvotes: 4
Views: 11408
Reputation: 2091
Find your own local android-sdk, if you download the relevant sdk of ndk, there will be a folder called "ndk-bundle"
There is a folder called "toolchains" inside.
We noticed that there are no mips64el related files inside.
The solution is as follows:
Click here to download the NDK package separately through the browser. After unzipping, open the "toolchains" folder, compare it with the android-sdk->ndk-bundle->toolchains folder, find the missing folder, copy the past 3. Recompile, the problem is solved. Hope it helps you mate
Upvotes: -1
Reputation: 156
Open Android Studio SDK Manager and under 'SDK platforms' tab, select the required Android versions(Ex:Android 8.1(Oreo)) and click OK. If the error keeps repeating, try installing some of the previous Android versions too.
Upvotes: 3
Reputation: 1525
Open Android studio, open Android SDK manager. Accept License of SDK.
Upvotes: 2