0

I setup environment for nativescript android build in 2 tries:

  • at first I use auto setup through ns cli, but it fails at the end.
  • after that I installed all manualy(android studio, JDK, and env. variables by ns official site instruction).

All this could lead to problems, so I let you know, how I'm getting in to the trouble.

Now I'm calling project build for android by tns build android and getting build error:

enter image description here

I tried to set target version manuali by flat --compileSdk 31 and got error, like a have't this compile sdk version:

enter image description here

But my android studio shows next things:

enter image description here

enter image description here

If I try to build using ns build android --compileSdk 30 - it starts but will fail with error at first screenshot.

I already tried to reinstall Android SDK Build-Tools and Android SDK Platform-Tools in android studio - none changes.

Any ideas how to fix this up?)

Mero
  • 630
  • 4
  • 12

1 Answers1

0

In project directory -> platform -> app build.gradle -> find "compileSdkVersion" inside android {} and set it value manualy:

compileSdkVersion 31

If it woun't help, try to look here:

How can I resolve the error "The minCompileSdk (31) specified in a dependency's AAR metadata" in native Java or Kotlin?

Mero
  • 630
  • 4
  • 12