i just crate a simple Nativescript-angular project by:
ns create example-app --ng
and when i run that by:
ns run android
i get this error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'core'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:7.1.2.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:7.1.2.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/7.1.2/gradle-7.1.2.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/7.1.2/gradle-7.1.2.pom'. Received status code 403 from server: Forbidden
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0.
Required by:
project :
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0.
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.0/kotlin-gradle-plugin-1.6.0.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.0/kotlin-gradle-plugin-1.6.0.pom'. Received status code 403 from server: Forbidden
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Failed to build plugin @nativescript/core :
Error: Command gradlew.bat failed with exit code 1
how can i solve this?
regards'
CodePudding user response:
finally, I find the reason. google and gradle put some countries to ban list, so some of files and packages from they can't download without VPN. I solve this issue just by buying a VPN account.