Closed tjzfg closed 6 years ago
I'll check it out later. Can you send an archive with the second project (the hello world one) and check what's your version of the nativescript CLI (tns --version
)?
Hi @sis0k0 ,thanks for response. I put a new project in my repository. My machine CLI's version is 3.1.3. In addition,I met another issue about Static binding generator which I described in Nativescript#4683,may these relatived? Look forward to your reply.Best regards.
@tjzfg I'm not getting any errors when trying to bundle the project you send. Can you send some details about your configuration - npm/node versions, OS, Android sdk. Also, please send the full build log. 10x in advance.
@sis0k0 I am facing same problem for Android. Same error when I use --uglify
@jibon57 , Can you send a project and some details about your environment?
@sis0k0 Thanks for reply.
All NativeScript components versions information ┌──────────────────┬─────────────────┬────────────────┬───────────────┐ │ Component │ Current version │ Latest version │ Information │ │ nativescript │ 3.1.3 │ 3.1.3 │ Up to date │ │ tns-core-modules │ 3.1.1 │ 3.1.1 │ Up to date │ │ tns-android │ 3.1.1 │ 3.1.1 │ Up to date │ │ tns-ios │ │ 3.1.0 │ Not installed │ └──────────────────┴─────────────────┴────────────────┴───────────────┘
package.json
"tns-android": {
"version": "3.1.1"
}
},
"dependencies": {
"@angular/animations": "~4.1.2",
"@angular/common": "~4.1.2",
"@angular/compiler": "~4.1.2",
"@angular/core": "~4.1.2",
"@angular/forms": "~4.1.2",
"@angular/http": "~4.1.2",
"@angular/platform-browser": "~4.1.2",
"@angular/platform-browser-dynamic": "~4.1.2",
"@angular/router": "~4.1.2",
"nativescript-advanced-webview": "^1.1.3",
"nativescript-angular": "~3.0.0",
"nativescript-audio": "^3.4.2",
"nativescript-background-task": "git+https://github.com/jibon57/nativescript-background-task.git",
"nativescript-cardview": "^2.0.0-rc.0",
"nativescript-checkbox": "^2.1.11",
"nativescript-drop-down": "^3.0.1",
"nativescript-exoplayer": "^3.2.1",
"nativescript-fancyalert": "^1.1.2",
"nativescript-gif": "^2.0.0",
"nativescript-image-cache": "^1.0.5",
"nativescript-loading-indicator": "^2.3.2",
"nativescript-localstorage": "git+https://github.com/jibon57/nativescript-localstorage.git",
"nativescript-ngx-slides": "git+https://github.com/TheOriginalJosh/nativescript-ngx-slides.git",
"nativescript-paypal": "file:///D:\\Others\\Desktop\\nativescript-paypal",
"nativescript-permissions": "^1.2.3",
"nativescript-pulltorefresh": "^2.0.0-rc.1",
"nativescript-social-share": "^1.4.0",
"nativescript-sqlite": "^1.1.7",
"nativescript-telerik-ui": "^2.0.1",
"nativescript-theme-core": "^1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "^5.4.0",
"tns-core-modules": "^3.1.1",
"zone.js": "^0.8.10"
},
"devDependencies": {
"@angular/compiler-cli": "~4.1.2",
"@ngtools/webpack": "~1.5.0",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"copy-webpack-plugin": "~4.0.1",
"extract-text-webpack-plugin": "~3.0.0",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-android-snapshot": "0.0.10",
"nativescript-dev-typescript": "~0.5.0",
"nativescript-dev-webpack": "^0.7.3",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.1.0",
"typescript": "~2.3.4",
"webpack": "~3.2.0",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "~1.0.1"
},
"scripts": {
"ns-bundle": "ns-bundle",
"publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
"generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install",
"start-android-bundle": "npm run ns-bundle --android --run-app",
"start-ios-bundle": "npm run ns-bundle --ios --run-app",
"build-android-bundle": "npm run ns-bundle --android --build-app",
"build-ios-bundle": "npm run ns-bundle --ios --build-app"
}
}
Error:
tns-java-classes.js 0 bytes [emitted]
[15] ./services/commonServices.ts 16 kB {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {16} [built]
[33] ./services/getJoomlaServer.ts 6.84 kB {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {16} [built]
[62] ./services/getMoodleServer.ts 4.93 kB {2} {3} {6} {7} {16} [built]
[153] .. lazy 160 bytes {18} [built]
[225] ./main.aot.ts 721 bytes {16} [built]
[228] ./package.json 84 bytes {18} [optional] [built]
[306] ./app.module.ngfactory.ts 31.7 kB {16} [built]
[307] ./app.module.ts 540 bytes {16} [built]
[312] ./routing.ts 3.41 kB {16} [built]
[319] ./app.component.ngfactory.ts 3.26 kB {16} [built]
[320] ./app.component.ts 5.63 kB {16} [built]
[326] ./vendor.ts 405 bytes {18} [built]
[327] ./vendor-platform.android.ts 460 bytes {18} [built]
[329] ./app.css 41 bytes {17} [built]
[435] ../node_modules/nativescript-css-loader?{"minimize":false}!./assets/css/custom.css 3.73 kB [built]
+ 421 hidden modules
Child app\components\home\home.html:
1 module
Child app\components\mycourses\mycourses.html:
1 module
Child app\components\dashboard\dashboard.html:
1 module
Child app\components\blog\blog.html:
1 module
Child app\components\about\about.html:
1 module
Child app\components\blog\popup\blog.popup.html:
1 module
Child app\components\forum\forum.html:
1 module
Child app\components\forum\forumadd.html:
1 module
Child app\components\forum\popup\forum.popup.html:
1 module
Child app\components\product\product.html:
1 module
Child app\components\login\login.html:
1 module
Child app\components\logout\logout.html:
1 module
Child app\components\bookliveclass\bookliveclass.html:
1 module
Child app\components\bookliveclass\bookliveteacher.html:
1 module
Child app\components\product\popup\product.popup.html:
1 module
Child app\components\bookliveclass\booklivecart.html:
1 module
Child app\components\profile\profile.html:
1 module
Child app\components\coursedetails\coursedetails.html:
1 module
Child app\components\coursebycat\coursebycat.html:
1 module
Child app\components\coursebycat\details\coursebycatdetails.html:
1 module
Child app\components\shared\menu\menu.html:
1 module
Child app\components\coursemodules\glossary\glossary.html:
1 module
Child app\components\coursemodules\page\page.html:
1 module
Child app\components\coursemodules\jibon\jibon.html:
1 module
Child app\components\coursemodules\dubbing\dubbing.html:
1 module
Child app\components\coursemodules\quiz\quiz.html:
1 module
Child app\components\home\home.css:
1 module
Child app\components\dashboard\dashboard.css:
1 module
Child app\components\mycourses\mycourses.css:
1 module
Child app\components\blog\blog.css:
1 module
Child app\components\forum\popup\forum.popup.css:
1 module
Child app\components\forum\forum.css:
1 module
Child app\components\product\product.css:
1 module
Child app\components\login\login.css:
1 module
Child app\components\logout\logout.css:
1 module
Child app\components\bookliveclass\bookliveclass.css:
1 module
Child app\components\bookliveclass\bookliveteacher.css:
1 module
Child app\components\product\popup\product.popup.css:
1 module
Child app\components\profile\profile.css:
1 module
Child app\components\coursedetails\coursedetails.css:
1 module
Child app\components\coursebycat\coursebycat.css:
1 module
Child app\components\coursebycat\details\coursebycatdetails.css:
1 module
Child app\components\coursemodules\glossary\glossary.css:
1 module
Child app\components\coursemodules\page\page.css:
1 module
Child app\components\coursemodules\jibon\jibon.css:
1 module
Child app\components\coursemodules\dubbing\dubbing.css:
1 module
Child app\components\coursemodules\quiz\quiz.css:
1 module
Child extract-text-webpack-plugin D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\node_modules\extract-text-webpack-plugin\dist D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\node_modules\resolve-url-loader\index.js??ref--1-1!D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\node_modules\nativescript-css-loader\index.js??ref--1-2!D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\node_modules\nativescript-dev-webpack\platform-css-loader.js!D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\app\app.css:
[1] ../node_modules/resolve-url-loader?{"silent":true,"absolute":false,"sourceMap":false,"fail":false,"keepQuery":false,"debug":false,"root":null,"includeRoot":false}!../node_modules/nativescript-css-loader?{"minimize":false}!../node_modules/nativescript-dev-webpack/platform-css-loader.js!./app.css 1.59 kB {0} [built]
[3] ../node_modules/nativescript-css-loader?{"minimize":false}!./assets/css/custom.css 3.73 kB {0} [built]
+ 2 hidden modules
Webpack Bundle Analyzer saved stats file to D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\report\stats.json
Webpack Bundle Analyzer saved report to D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\report\report.html
Running tns build...
Executing before-prepare hook from D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\hooks\before-prepare\nativescript-dev-android-snapshot.js
Executing before-prepare hook from D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\hooks\before-prepare\nativescript-dev-typescript.js
Preparing project...
> Configuring > 0/3 projects > root project > Resolving dependencies ':classpath'
:config phase: createDefaultIncludeFiles
> Configuring > 0/3 projects > root project
:config phase: addAarDependencies
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\Common-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\Data-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\List-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\Primitives-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_5p8r17h2fffuzk6mfvy9235d3.run(D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\build-tools\android-static-binding-generator\build.gradle:126)
:asbg:clean UP-TO-DATE
:deleteMetadata
:deleteFlavors
:deleteConfigurations UP-TO-DATE
:deleteGeneratedBindings UP-TO-DATE
:clean
BUILD SUCCESSFUL
Total time: 4.526 secs
Project successfully prepared (android)
Executing after-prepare hook from D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\hooks\after-prepare\nativescript-dev-android-snapshot.js
Building project...
> Configuring > 0/3 projects > root project > Resolving dependencies ':classpath'
:config phase: createDefaultIncludeFiles
+found plugins: nativescript-advanced-webview
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-advanced-webview -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F0
+found plugins: nativescript-background-task
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-background-task -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F1
+found plugins: nativescript-cardview
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-cardview -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F2
+found plugins: nativescript-exoplayer
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-exoplayer -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F3
+found plugins: nativescript-fancyalert
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-fancyalert -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F4
+found plugins: nativescript-gif
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-gif -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F5
+found plugins: nativescript-image-cache
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-image-cache -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F6
+found plugins: nativescript-paypal
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-paypal -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F7
+found plugins: nativescript-telerik-ui
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\nativescript-telerik-ui -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F8
+found plugins: tns-core-modules-widgets
+ creating include.gradle file for D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\tns-core-modules-widgets
Renaming plugin directory to flavor name: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\tns-core-modules-widgets -> D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\F9
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-advanced-webview\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-background-task\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-cardview\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-exoplayer\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-fancyalert\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-gif\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-image-cache\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-paypal\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\nativescript-telerik-ui\include.gradle
+applying configuration from: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\configurations\tns-core-modules-widgets\include.gradle
> Configuring > 0/3 projects > root project
:config phase: addAarDependencies
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\Common-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\Data-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\List-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\Primitives-2017.1.504-dev-release.aar
+adding dependency: D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_5p8r17h2fffuzk6mfvy9235d3.run(D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\build-tools\android-static-binding-generator\build.gradle:126)
:preBuild UP-TO-DATE
:preF0F1F2F3F4F5F6F7F8F9DebugBuild UP-TO-DATE
:checkF0F1F2F3F4F5F6F7F8F9DebugManifest
:preF0F1F2F3F4F5F6F7F8F9ReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:prepareComAndroidSupportAppcompatV72531Library
:prepareComAndroidSupportCardviewV72531Library
:prepareComAndroidSupportCustomtabs2501Library
:prepareComAndroidSupportDesign2531Library
:prepareComAndroidSupportRecyclerviewV72531Library
:prepareComAndroidSupportSupportCompat2531Library
:prepareComAndroidSupportSupportCoreUi2531Library
:prepareComAndroidSupportSupportCoreUtils2531Library
:prepareComAndroidSupportSupportFragment2531Library
:prepareComAndroidSupportSupportMediaCompat2531Library
:prepareComAndroidSupportSupportV42531Library
:prepareComAndroidSupportSupportVectorDrawable2531Library
:prepareComAndroidSupportTransition2531Library
:prepareComFacebookFrescoDrawee140Library
:prepareComFacebookFrescoFbcore140Library
:prepareComFacebookFrescoFresco140Library
:prepareComFacebookFrescoImagepipeline140Library
:prepareComFacebookFrescoImagepipelineBase140Library
:prepareComGithubAndyxialmColorDialogFc1804b35aLibrary
:prepareComGoogleAndroidExoplayerExoplayerR231Library
:prepareComPaypalSdkPaypalAndroidSdk2142Library
:prepareCommon20171504DevReleaseLibrary
:prepareData20171504DevReleaseLibrary
:prepareIoCardAndroidSdk534Library
:prepareList20171504DevReleaseLibrary
:preparePlDroidsonroidsGifAndroidGifDrawable1117Library
:preparePrimitives20171504DevReleaseLibrary
:prepareSnmandarinRuntimeUnspecifiedLibrary
:prepareWidgetsReleaseLibrary
:prepareF0F1F2F3F4F5F6F7F8F9DebugDependencies
:compileF0F1F2F3F4F5F6F7F8F9DebugAidl
:compileF0F1F2F3F4F5F6F7F8F9DebugRenderscript
:generateF0F1F2F3F4F5F6F7F8F9DebugBuildConfig
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser
Running full build
finished with reading lines with js files
:asbg:generateBindings
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
File:D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\src\main\java\com\tns\gen\java\lang\Object_frnal_ts_helpers_l58_c38__t.java Class:
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:68)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
:asbg:generateBindings FAILED
FAILURE: Build failed with an exception.
* Where:
Build file 'D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 254
* What went wrong:
Execution failed for task ':asbg:generateBindings'.
> Process 'command 'C:\Program Files\Android\Android Studio\jre\bin\java.exe'' finished with non-zero exit value 1
* 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: 30.145 secs
Command gradlew.bat failed with exit code 1
# build android
┌─────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage │ Synopsis │
│ General │ $ tns build android [--compileSdk <API Level>] [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias │
│ │ -password <Password>] [--release] [--static-bindings] [--copy-to <File Path>] │
└─────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
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.
### Attributes
<API Level> is a valid Android API level. For example: 22, 23.
child process exited with code 127
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "ns-bundle" "--android" "--build-app"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! file C:\Windows\system32\cmd.exe
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! @ ns-bundle: `ns-bundle`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the @ ns-bundle script 'ns-bundle'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ns-bundle
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\npm-debug.log
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build-android-bundle" "--uglify"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ build-android-bundle: `npm run ns-bundle --android --build-app`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ build-android-bundle script 'npm run ns-bundle --android --build-app'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run ns-bundle --android --build-app
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Others\Documents\My_Work\SN_NativeScript_Final_WebPack\npm-debug.log
@sis0k0 Same project is building fine for IOS but not working for android if I use --uglify.
@jibon57 I can't reproduce the error with the provided package.json. It may be something in your app's code. Do you have native extends?
@sis0k0 , Can I send you files to you by email? Will you please share your email? I will send you full package to you.
@jibon57 stanimira.vlaeva@gmail.com
@sis0k0 Thank you. I have sent you an email.
@sis0k0 Any update in this issue?
@sis0k0 @jibon57 Hi, I have the same problem. Any update in this issue ?
┌──────────────────┬─────────────────┬────────────────┬─────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 3.2.0 │ 3.2.0 │ Up to date │
│ tns-core-modules │ 3.2.0 │ 3.2.0 │ Up to date │
│ tns-android │ 3.2.0 │ 3.2.0 │ Up to date │
│ tns-ios │ 3.2.0 │ 3.2.0 │ Up to date │
└──────────────────┴─────────────────┴────────────────┴─────────────┘
Same here. I'm on 3.2.0
Any update on this issue?
I have the same error only when adding --uglify. Is there a way to track down where it fails exactly since that error message doesn't really help?
I use Nativescript Sidekick -> Navigation Drawer clean template and get the following error when trying to build with webpack: npm run start-android-bundle
Running full build
FAILURE: Build failed with an exception.
Where: Build file 'C:\Development\NativeScript\Sidebar\Sidebar\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 281
What went wrong: Execution failed for task ':asbg:generateBindings'.
No C:\Development\NativeScript\Sidebar\Sidebar\platforms\android\build-tools\android-static-binding-generator/bindings.txt was found after runAstParser task was ran! Check to see if there are any .js files inside C:\Development\NativeScript\Sidebar\Sidebar\platforms\android\app\src\main\assets\app
Same here, tns-core-modules 3.3.0
Same here, tns-core-modules 3.3.1
Same here, tns-core-modules 3.3.0
Same here, 3.1.1.
experiencing the same error, just updated to 3.4.0
Hey everyone! Can you share your package json file or a simple app with repro of the problem?
here is my package.json, project created from angular-sidedrawer template
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.xsanisty.logsheettns",
"tns-android": {
"version": "3.4.0"
}
},
"android": {
"markingMode": "none"
},
"scripts": {
"ngc": "ngc",
"lint": "tslint \"app/**/*.ts\"",
"ns-bundle": "ns-bundle",
"publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
"generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install",
"start-android-bundle": "npm run ns-bundle --android --run-app",
"start-ios-bundle": "npm run ns-bundle --ios --run-app",
"build-android-bundle": "npm run ns-bundle --android --build-app",
"build-ios-bundle": "npm run ns-bundle --ios --build-app"
},
"dependencies": {
"@angular/animations": "4.4.6",
"@angular/common": "4.4.6",
"@angular/compiler": "4.4.6",
"@angular/core": "4.4.6",
"@angular/forms": "4.4.6",
"@angular/http": "4.4.6",
"@angular/platform-browser": "4.4.6",
"@angular/router": "4.4.6",
"angular2-jwt": "^0.2.3",
"enhanced-resolve": "^3.3.0",
"moment": "^2.19.4",
"nativescript-angular": "4.4.1",
"nativescript-background-http": "^3.1.0",
"nativescript-barcodescanner": "^2.7.2",
"nativescript-carousel": "^3.1.1",
"nativescript-feedback": "^1.1.0",
"nativescript-local-notifications": "^1.2.2",
"nativescript-nfc": "^2.1.0",
"nativescript-ngx-fonticon": "^2.2.3",
"nativescript-platform-css": "^1.6.5",
"nativescript-pro-ui": "^3.2.0",
"nativescript-sqlite": "^2.0.1",
"nativescript-textinputlayout": "^2.0.0",
"nativescript-theme-core": "1.0.4",
"reflect-metadata": "0.1.10",
"rxjs": "5.5.2",
"squel": "^5.12.0",
"tns-core-modules": "^3.4.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@angular/compiler-cli": "4.4.6",
"@ngtools/webpack": "~1.6.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "3.2.2",
"copy-webpack-plugin": "~4.0.1",
"extract-text-webpack-plugin": "~3.0.0",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-sass": "1.3.2",
"nativescript-dev-typescript": "0.5.1",
"nativescript-dev-webpack": "^0.8.0",
"nativescript-worker-loader": "~0.8.1",
"node-sass": "4.5.3",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.1.0",
"tns-platform-declarations": "^3.2.0",
"tslint": "5.8.0",
"typescript": "~2.3.4",
"webpack": "~3.2.0",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "^1.1.0"
}
}
Same here, tns-core-modules 3.4.0
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.dabaolah.client",
"tns-android": {
"version": "3.4.0"
}
},
"dependencies": {
"nativescript-camera": "3.2.1",
"nativescript-directions": "1.1.0",
"nativescript-fonticon": "1.1.1",
"nativescript-geolocation": "4.2.2",
"nativescript-google-maps-sdk": "2.4.3",
"nativescript-localize": "2.0.5",
"nativescript-localstorage": "1.1.5",
"nativescript-phone": "1.3.1",
"nativescript-plugin-firebase": "5.0.4",
"nativescript-pro-ui": "3.2.0",
"nativescript-slideshow-busy-indicator": "3.0.1",
"nativescript-social-share": "1.5.0",
"nativescript-theme-core": "1.0.4",
"nativescript-zxing": "1.5.2",
"tns-core-modules": "^3.4.0"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"copy-webpack-plugin": "~4.0.1",
"extract-text-webpack-plugin": "~3.0.0",
"lazy": "1.0.11",
"nativescript-css-loader": "~0.26.0",
"nativescript-dev-webpack": "^0.8.0",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.1.0",
"webpack": "~3.2.0",
"webpack-bundle-analyzer": "^2.8.2",
"webpack-sources": "~1.0.1"
},
"scripts": {
"ns-bundle": "ns-bundle",
"publish-ios-bundle": "npm run ns-bundle --ios --publish-app",
"generate-android-snapshot": "generate-android-snapshot --targetArchs arm,arm64,ia32 --install",
"start-android-bundle": "npm run ns-bundle --android --run-app",
"start-ios-bundle": "npm run ns-bundle --ios --run-app",
"build-android-bundle": "npm run ns-bundle --android --build-app",
"build-ios-bundle": "npm run ns-bundle --ios --build-app"
}
}
You need to update the webpack plugin as well. This project uses the sidedrawer template and works for me: https://github.com/sis0k0/ns-sidedrawer-demo
After updating to latest versions of NativeScript Pro UI plugin, modules and nativescript-dev-webpack everything works as expected on my side with this test project. Closing this as resolved but please do let me know if you have a stable project to reproduce the issue. ping @yclau @ikhsan017 migration guide to use the latest versions of nativescript-dev-webpack can be found here
I updated to the latest (tell me if I forgot something) :
And I still get the error
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
File:/Users/me/Documents/nativescript_apps/myapp/platforms/android/app/src/main/java/com/tns/gen/java/lang/Object_frnal_ts_helpers_l58_c38__t.java Class:
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:68)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/me/Documents/nativescript_apps/myapp/platforms/android/build-tools/android-static-binding-generator/build.gradle' line: 284
* What went wrong:
Execution failed for task ':asbg:generateBindings'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
It happens when I run tns run android --bundle --env.aot --env.snapshot --env.uglify --env.report
I am following instruction from this official blog here, https://www.nativescript.org/blog/nativescript-webpack-0.9.0-what-changed-and-how-to-upgrade
I can confirm that the issue on my side is now resolved
I created a new project from Sidekick. and only imported my code in the project [.ts, .html, *.scss] files.
Reference: https://github.com/NativeScript/nativescript-dev-webpack/issues/402
this is my package.json:
{
"description": "My App",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.myapp.myapplication",
"tns-android": {
"version": "3.4.0"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"@angular/animations": "5.1.0",
"@angular/common": "5.1.0",
"@angular/compiler": "5.1.0",
"@angular/core": "5.1.0",
"@angular/forms": "5.1.0",
"@angular/http": "5.1.0",
"@angular/platform-browser": "5.1.0",
"@angular/platform-browser-dynamic": "5.1.0",
"@angular/router": "5.1.0",
"@ngrx/effects": "4.1.1",
"@ngrx/store": "4.1.1",
"@ngx-translate/core": "9.0.2",
"@ngx-translate/http-loader": "2.0.1",
"@types/lodash": "4.14.92",
"@types/node": "9.3.0",
"lodash": "4.17.4",
"moment": "2.20.1",
"nativescript-angular": "5.1.0",
"nativescript-appversion": "1.4.1",
"nativescript-background-http": "3.1.0",
"nativescript-camera": "3.2.1",
"nativescript-facebook": "2.1.0",
"nativescript-loading-indicator": "2.4.0",
"nativescript-local-notifications": "2.0.2",
"nativescript-localstorage": "1.1.5",
"nativescript-mediafilepicker": "1.0.4",
"nativescript-plugin-firebase": "^5.1.2",
"nativescript-plugin-twitter": "2.0.7",
"nativescript-pro-ui": "~3.3.0",
"nativescript-sentry": "1.5.2",
"nativescript-sms-inbox": "1.0.7",
"nativescript-social-share": "1.5.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "1.4.6",
"nativescript-videorecorder": "2.0.4",
"nativescript-web-image-cache": "4.2.2",
"reflect-metadata": "~0.1.10",
"rxjs": "5.5.2",
"tns-core-modules": "~3.4.0",
"zone.js": "~0.8.18"
},
"devDependencies": {
"@angular/compiler-cli": "~5.1.0",
"@ngtools/webpack": "~1.9.1",
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"codelyzer": "~4.0.2",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.3.5",
"nativescript-dev-typescript": "~0.6.0",
"nativescript-dev-webpack": "~0.9.0",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"sass-loader": "~6.0.6",
"tslint": "~5.8.0",
"typescript": "^2.6.2",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0"
}
}
I met a exception in my tns+ng2+webpack project,as below
I read the relative isses,eg #176 ,there is some difference in my project.
So I just run 'tns create myApp --ng' to create a whole pure project,install webpack.Then I met the exactly same expection after run 'npm run start-android-bundle --ugilfy'.It is all right when use 'npm run start-android-bundle'
May somewhere go wrong?