Alex K
Alex K

Reputation: 183

Nativescript on windows7 `tns platform add android` can't find the right Android SDK

i was looking for answer to this question and found this Cannot find a compatible Android SDK for compilation when running `tns platform add android` But none of the answers helped me, it still throws error. Here is what i'm doing:

  1. Installed chocolatey
  2. installed everything like in tutorial
  3. Cloned sample project and so on
  4. Trying to "tns platform add android" and got
    Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.

My setup is Windows7 x32, and it's my first time to try nativescript (which looks really powerful at the sample video), and i'm really interested in it, can someone help me with this problem?

Upvotes: 0

Views: 865

Answers (2)

Alex K
Alex K

Reputation: 183

Looks like i've found answer to my own question again.
I looked at Set Up Windows guide and at the line
Install the required Android SDKs and the Local Maven repository for Support Libraries.
with code echo yes | "%ANDROID_HOME%\tools\android" update sdk --filter tools,platform-tools,android-23,build-tools-23.0.2,extra-android-m2repository,extra-google-m2repository,extra-android-support --all --no-ui
bug appeared here, nothing actually installed nor updated, i should get everything at right from the | in that code and run it in cmd, answering y on all questions. That helped, but thanks for all answers, it made me look one more time at docs.

Upvotes: 1

Osei Fortune
Osei Fortune

Reputation: 831

Did you install the sdk platform & tools ? If not run android from the command prompt the sdk manager should open then you can install the tools required (Android SDK Tools, Android SDK Platform-tools & Android SDK Build-tools). After try running tns platform add android again ..:)

Upvotes: 1

Related Questions