Error occurred when cli gets updated


#1

tns build android
Executing before-prepare hook from /home/ileaf-pc/fog/hooks/before-prepare/nativescript-dev-sass.js
Found peer node-sass
Preparing project…
Successfully prepared plugin nativescript-pro-ui for android.
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-core-modules-widgets for android.
Project successfully prepared (android)
Executing after-prepare hook from /home/ileaf-pc/fog/hooks/after-prepare/nativescript-dev-sass.js
All SASS source files removed from app package
Building project…
Gradle build…
+ applying user-defined configuration from /home/ileaf-pc/fog/app/App_Resources/Android/app.gradle
+ add include.gradle from /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/include.gradle
+ applying plugin configuration from /home/ileaf-pc/fog/platforms/android/app/build/configurations/nativescript-pro-ui/include.gradle
+ adding nativescript runtime package dependency: nativescript-optimized
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Chart-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Feedback-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Primitives-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Input-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Data-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Gauges-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/Common-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/nativescript-pro-ui/platforms/android/List-2017.1.1030-dev-release.aar
+ adding aar plugin dependency: /home/ileaf-pc/fog/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
false
Running full build

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task β€˜:app:compileF0DebugJavaWithJavac’.

java.lang.reflect.UndeclaredThrowableException

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

  • Get more help at https://help.gradle.org

BUILD FAILED in 53s
Command ./gradlew failed with exit code 1

build android

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Usage β”‚ Synopsis β”‚
β”‚ General β”‚ $ tns build android [–compileSdk ] [–key-store-path --key-store-password --key-store-alias --key-store-alias β”‚
β”‚ β”‚ -password ] [–release] [–static-bindings] [–copy-to ] [–bundle [] [–env.*]] β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator.

Options

* --compileSdk - Sets the Android SDK that will be used to build the project.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --copy-to - Specifies the file path where the built .apk will be copied. If it points to a non-existent directory, it will be created. If the specified value is directory, the original file name will be used.
* --bundle - Specifies that a bundler (e.g. webpack) should be used if one is present. If no value is passed will default to webpack.
* --env.* - Specifies additional flags that the bundler may process. May be passed multiple times. For example: --env.uglify --env.snapshot.

Attributes

is a valid Android API level. For example: 22, 23.


#2

go ahead and delete the following folders /node_modules, /hooks and /platform and rebuild again that may solve your problem