Nativescript “Install Android SDK Platform 25” failed


I am creating an app using nativescript. I have added the android platform as follows
tns platform add android --sdk 22

as I want to build for API level 22.

And when I build the app I get the following error.

    at org.gradle.internal.concurrent.StoppableExecutorImpl$
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$ Source)
    at Source)
    "Install Android SDK Platform 25" failed.

Where is it getting SDK platform 25 from? How can I overcome this?

Also, do mention how can I build for a specific API level.



There’s a thread just down below asking the same thing.

And, is there a tutorial or anything that displays that particular use of the tns platform add command, because that’s incorrect.