I have generated a new project with the following command
tns create nativescript --template tns-template-blank
I have added no code to the project.
When I try to run it on Android, build fails with the following error:
Building project...
Gradle build...
+ setting applicationId
+ applying user-defined configuration from D:\Taf\Moventes\Dev\moventest\nativescript\app\App_Resources\Android\app.gradle
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: D:\Taf\Moventes\Dev\moventest\nativescript\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not generate a proxy class for class com.android.build.gradle.tasks.BuildArtifactReportTask.
* 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 5s
Unable to apply changes on device: FA75Z1802706. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from d:\Taf\Moventes\Dev\moventest\nativescript\hooks\after-watch\nativescript-dev-webpack.js
Executing after-watch hook from d:\Taf\Moventes\Dev\moventest\nativescript\hooks\after-watch\nativescript-dev-webpack.js
I am on Windows 10, using the following:
@Malrok I am able to successfully create a project using the base JS template - tested on Windows 10.
From the error log, it seems that the issue is related to a corrputed Gradle - check this thread for possible solutions
For those having the same problem, I had to update my JDK version to 1.8.0_181, delete the .gradle directory in my users' home and launch build again.
Then it worked ^^
Thanks for the help!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
For those having the same problem, I had to update my JDK version to 1.8.0_181, delete the .gradle directory in my users' home and launch build again.
Then it worked ^^
Thanks for the help!