sumit
sumit

Reputation: 31

I am trying to get build of nativescript with react but getting this error in build?

C:\ns\example-app>java -version

java version "17" 2021-09-14 LTS
Java(TM) SE Runtime Environment (build 17+35-LTS-2724)
Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed 
mode, sharing)

C:\ns\example-app>ns -version

8.1.5
√ Up to date.

C:\ns\example-app>npm -version

6.14.15

enter image description here

Upvotes: 3

Views: 153

Answers (1)

Lorraine Ram-El
Lorraine Ram-El

Reputation: 2785

Try to uninstall and then reinstall Android SDK using the Android SDK Manager.

You can do this by installing Android Studio, and opening the SDK Manager: enter image description here

Then, click on "SDK Manager" (red mark), then "Show all packages" (orange mark) and then uncheck version 31.0.0 (should be where my blue mark is), and click apply to uninstall it. Then, check version 31.0.0 (or any other version), and click apply to install it again. enter image description here

I have both versions 30.0.2 and 26.0.3 and they work great.

Also, check to see that the $ANDROID_HOME and $ANDROID_SDK_ROOT paths are correctly set by following this answer.

After you've reinstalled the packages, check this answer to see how to fix a corrupt SDK installation if it is still corrupt.

Upvotes: 1

Related Questions