sdk error while building android application below api level 24

Asked

Viewed 29 times

1

I built a simple test app. When I build for versions of android sdk equal to or greater than 24 it recognizes the SDK and does the correct procedure, but if you try to build other versions like the 22 and 23 (Android 5.1 and 6.0) error appears and the procedure is not completed. If it is SDK 23 the situation is even worse because it can’t even add the Android platform to the Ionic project, unlike API level 23, which in turn adds the platform but cannot build.

What have I ever tried: I added the path of sdk and Gradle as a system variable by the windows manager, changed several times the versions of SDK for testing, arriving at the conclusion that the SDK only does not work when less than 24, updated Gradle and already added the commands :

set ANDROID_HOME=C:\Users\Herick Pereira\AppData\Local\Android\sdk
set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

Error that appears:

Android SDK not found. Make sure that it is installed. If it is not at the default location, set the ANDROID_HOME environment variable.

Configuration used:

Ionic:

   Ionic CLI                     : 6.12.3 (C:\Users\Herick Pereira\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 5.5.2
   @angular-devkit/build-angular : 0.1000.8
   @angular-devkit/schematics    : 10.0.8
   @angular/cli                  : 10.0.8
   @ionic/angular-toolkit        : 2.3.3

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : android 7.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 1.3.0

System:

   NodeJS : v14.15.4 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.10
   OS     : Windows 10

  • Friend tried to remove and add the platform?

  • Hi thanks for the comment, I reinstalled jdk, I reinstalled java_home and restarted the pc ai worked

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.