Nativescript-Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.

Installing typescript and the SDK required, was a pain in the ass, but after spending days on the internet, I finally found a way to get it working.

Before getting NativeScript to display the “No Issues Detected”, it was very difficult. The common problems people are facing is not being able to get NativeScript to find the SDK to user and also the right version.















The issue:

Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.
Run $ android to manage your Android SDK versions.

You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
Run $ android to manage the Android Support Repository


After installing NativeScript and the required JDK and going through the documentation online, the error above was thrown.

Solution

I found out that NativeScript was looking at another folder in the “c:\users\USR \ AppData\Local\Android\sdk” directory for the SDK path. I also have another SDK path on the Program Files folder which Android Studio uses. At the end of the day, I had set the “ANDROID_HOME” system environment path to the AppData directory (C:\users\USR\AppData\Local\Android\sdk) for it to work.


















Note, check the documentation and make sure you follow the requirements. Below is the snapshot of the SDK manager.














Comments

Popular posts from this blog

Paystack In Asp.Net MVC

Solved: Jwt Authentication in Asp.Net Web Api And Mvc

Coingate in .Net