NativeScript: sample project won't build on Android

i use “tns create sample” to successfully created a project , when i tried to run it on Android , it fails to build , says :

> Executing before-prepare hook from /Users/c1ngular/Projects/TNSProject/sample/hooks/before-prepare/nativescript-dev-android-snapshot.js
Preparing project...

:config phase:  createDefaultIncludeFiles

:config phase:  addAarDependencies
        +adding dependency: /Users/c1ngular/Projects/TNSProject/sample/platforms/android/libs/aar/widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'sample'.
> java.lang.NullPointerException (no error message)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.774 secs
Processing node_modules failed. Error: Command ./gradlew failed with exit code 1

it works fine on iOS emulator ! Java version “1.8.0_121” TNS: 3.0.1 Android SDK Build Tools : 25.0.2 Android SDK Platform-Tools :25.0.6

thanks !

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

@NickIliev never mind , i formatted HD and reinstalled system , it is working now ! thanks again !