Closed hamdiwanis closed 6 years ago
Hey, @hamdiwanis, can you share the full build log? It should contain more information about the error. If you can also share your package.json, that would help us understand what's causing the problem. Thanks in advance!
thank you for your help :)
this is my package.json
{
"description": "test app",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "test app",
"nativescript": {
"id": "com.test.testApp",
"tns-ios": {
"version": "3.4.1"
},
"tns-android": {
"version": "3.4.1"
}
},
"dependencies": {
"@angular/animations": "^5.2.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"nativescript-angular": "^5.1.0",
"nativescript-barcodescanner": "^2.7.4",
"nativescript-exit": "^1.0.1",
"nativescript-feedback": "1.1.0",
"nativescript-google-maps-sdk": "2.4.3",
"nativescript-image-cache": "^1.1.5",
"nativescript-iqkeyboardmanager": "^1.2.0",
"nativescript-ngx-fonticon": "^4.0.0",
"nativescript-pro-ui": "^3.3.0",
"nativescript-social-share": "^1.5.0",
"nativescript-theme-core": "^1.0.4",
"node-sass": "^4.7.2",
"reflect-metadata": "0.1.10",
"rxjs": "5.4.3",
"tns-core-modules": "^3.4.0",
"zone.js": "0.8.17"
},
"devDependencies": {
"@angular/compiler-cli": "^5.2.0",
"@ngtools/webpack": "~1.9.1",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-android-snapshot": "^0.*.*",
"nativescript-dev-sass": "^1.3.5",
"nativescript-dev-typescript": "0.5.1",
"nativescript-dev-webpack": "^0.9.1",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"sass-loader": "~6.0.6",
"tns-platform-declarations": "^3.4.0",
"tslint": "^5.9.1",
"typescript": "~2.5.3",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0"
},
"author": "tester"
}
and this is the build log
hw:test app hamdiwanis$ tns build android --bundle --env.uglify --env.snapshot
Executing before-prepare hook from /Volumes/test_app/test app/hooks/before-prepare/nativescript-dev-android-snapshot.js
Executing before-prepare hook from /Volumes/test_app/test app/hooks/before-prepare/nativescript-dev-sass.js
Executing before-prepare hook from /Volumes/test_app/test app/hooks/before-prepare/nativescript-dev-typescript.js
Preparing project...
Executing before-prepareJSApp hook from /Volumes/test_app/test app/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Running webpack for android...
Project root: /Volumes/test_app/test app
Snapshots build directory: /Volumes/test_app/test app/platforms/android/app/snapshot-build/build
95% emitting
Snapshotting bundle at /Volumes/test_app/test app/platforms/android/app/src/main/assets/app/vendor.js
Running snapshot generation with the following arguments:
{
"inputFile": "/Volumes/test_app/test app/platforms/android/app/src/main/assets/app/vendor.js",
"preprocessedInputFile": "/Volumes/test_app/test app/platforms/android/app/src/main/assets/app/_embedded_script_.js",
"targetArchs": [
"arm"
],
"useLibs": false,
"tnsJavaClassesPath": "/Volumes/test_app/test app/platforms/android/app/src/main/assets/app/tns-java-classes.js"
}
Snapshot tools path: /var/folders/46/3pylpc0j34ggn3jwdz9j54pr0000gn/T/snapshot-tools
Webpack compilation complete.
***** Generating snapshot for armeabi-v7a ***** Hash: 42e68bbfaff5251fc736
Version: webpack 3.10.0
Time: 53286ms
Asset Size Chunks Chunk Names
App_Resources/Android/drawable-xxxhdpi/scan_bg.png 487 kB [emitted] [big]
0.js 37.8 kB 0 [emitted]
2.js 45.8 kB 2 [emitted]
3.js 10.1 kB 3 [emitted]
4.js 11.7 kB 4 [emitted]
5.js 11.3 kB 5 [emitted]
6.js 12.2 kB 6 [emitted]
bundle.js 19.2 kB 7 [emitted] bundle
tns-java-classes.js 61 bytes 8 [emitted] tns-java-classes
vendor.js 1.86 MB 9 [emitted] [big] vendor
fonts/ionicons.css 36.1 kB [emitted]
fonts/ionicons.ttf 189 kB [emitted]
fonts/Lateef.ttf 246 kB [emitted]
App_Resources/Android/AndroidManifest.xml 1.66 kB [emitted]
App_Resources/Android/drawable-hdpi/icon.png 3.77 kB [emitted]
App_Resources/Android/app.gradle 561 bytes [emitted]
App_Resources/Android/drawable-hdpi/splash_icon.png 11.7 kB [emitted]
App_Resources/Android/drawable-ldpi/icon.png 3.77 kB [emitted]
App_Resources/Android/drawable-hdpi/splash.png 26.8 kB [emitted]
App_Resources/Android/drawable-ldpi/splash_icon.png 11.7 kB [emitted]
App_Resources/Android/drawable-mdpi/icon.png 3.77 kB [emitted]
App_Resources/Android/drawable-ldpi/splash.png 26.8 kB [emitted]
App_Resources/Android/drawable-mdpi/splash_icon.png 11.7 kB [emitted]
App_Resources/Android/drawable-nodpi/splash_screen.xml 204 bytes [emitted]
App_Resources/Android/drawable-mdpi/splash.png 26.8 kB [emitted]
App_Resources/Android/drawable-xhdpi/icon.png 3.77 kB [emitted]
App_Resources/Android/drawable-hdpi/scan_bg.png 487 kB [emitted] [big]
App_Resources/Android/drawable-ldpi/scan_bg.png 487 kB [emitted] [big]
App_Resources/Android/drawable-xhdpi/splash_icon.png 11.7 kB [emitted]
App_Resources/Android/drawable-xhdpi/splash.png 26.8 kB [emitted]
App_Resources/Android/drawable-mdpi/scan_bg.png 487 kB [emitted] [big]
App_Resources/Android/drawable-xxhdpi/icon.png 3.77 kB [emitted]
App_Resources/Android/drawable-xxhdpi/splash_icon.png 11.7 kB [emitted]
App_Resources/Android/drawable-xxhdpi/splash.png 26.8 kB [emitted]
App_Resources/Android/drawable-xxxhdpi/icon.png 3.77 kB [emitted]
App_Resources/Android/drawable-xxxhdpi/book_cover.jpg 218 kB [emitted]
App_Resources/Android/drawable-xxxhdpi/splash_icon.png 11.7 kB [emitted]
App_Resources/Android/drawable-xxxhdpi/splash.png 26.8 kB [emitted]
App_Resources/Android/drawable-xhdpi/scan_bg.png 487 kB [emitted] [big]
App_Resources/Android/settings.gradle 1.5 kB [emitted]
App_Resources/Android/settings.json 78 bytes [emitted]
App_Resources/Android/drawable-xxhdpi/scan_bg.png 487 kB [emitted] [big]
App_Resources/Android/values-v21/colors.xml 104 bytes [emitted]
App_Resources/Android/values-v21/styles.xml 1.01 kB [emitted]
App_Resources/Android/values/colors.xml 237 bytes [emitted]
App_Resources/Android/values/nativescript_google_maps_api.xml 165 bytes [emitted]
App_Resources/Android/values/styles.xml 1.72 kB [emitted]
1.js 15.7 kB 1 [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json 1.89 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png 2.1 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png 5.44 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png 9.15 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png 3.38 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png 8.42 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png 14.2 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png 14.2 kB [emitted]
App_Resources/Android/drawable-xxxhdpi/image_placeholder.png 1.07 MB [emitted] [big]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png 23.6 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png 7.79 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png 198 kB [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png 19.3 kB [emitted]
App_Resources/iOS/Assets.xcassets/Contents.json 62 bytes [emitted]
App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png 21.3 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json 3.77 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png 63.7 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png 62.4 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png 114 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png 61 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png 184 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png 191 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png 20.8 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png 203 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json 373 bytes [emitted]
App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png 1.71 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png 4 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json 365 bytes [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png 186 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png 62.9 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png 66.8 kB [emitted]
App_Resources/iOS/build.xcconfig 504 bytes [emitted]
App_Resources/iOS/icon@2x.png 4.13 kB [emitted]
App_Resources/iOS/icon.png 1.35 kB [emitted]
App_Resources/iOS/Info.plist 1.47 kB [emitted]
App_Resources/iOS/icon@3x.png 3.77 kB [emitted]
App_Resources/iOS/LaunchScreen.storyboard 3.93 kB [emitted]
App_Resources/iOS/scan_bg.png 77 kB [emitted]
App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png 207 kB [emitted]
App_Resources/iOS/splash.png 8.41 kB [emitted]
App_Resources/iOS/scan_bg@2x.png 256 kB [emitted] [big]
App_Resources/iOS/splash@2x.png 29.2 kB [emitted]
App_Resources/iOS/image_placeholder.png 1.07 MB [emitted] [big]
App_Resources/iOS/splash@3x.png 26.8 kB [emitted]
App_Resources/iOS/scan_bg@3x.png 487 kB [emitted] [big]
package.json 164 bytes [emitted]
starter.js 39 bytes [emitted]
[61] ./services/util.service.ts 2.49 kB {9} [built]
[96] ./modules/shared/book-details-view/book-details-view.component.ts 5.2 kB {9} [built]
[97] ./modules/shared/retry-dialog/retry-dialog.component.ts 899 bytes {9} [built]
[99] ./services/user.service.ts 4.9 kB {9} [built]
[100] ./modules/shared/shared.module.ts 2.13 kB {9} [built]
[101] ./services/auth.service.ts 3.34 kB {0} {1} {4} {7} [built]
[111] ./services/book.service.ts 2.01 kB {9} [built]
[204] ./modules/shared/ns-action-bar/ns-action-bar.component.ts 2.07 kB {9} [built]
[228] ./main.ts 433 bytes {7} [built]
[335] ./app.module.ts 3.29 kB {7} [built]
[352] ./vendor.ts 1.39 kB {9} [built]
[353] . nonrecursive ^\.\/app\.(css|scss|less|sass)$ 189 bytes {9} [built]
[356] ./vendor-platform.ts 406 bytes {9} [built]
[357] ./modules/shared/index.ts 630 bytes {9} [built]
[358] ../platforms/android/app/snapshot-build/tns-java-classes.js 59 bytes {8} [built]
+ 418 hidden modules
ERROR in NativeScriptSnapshot. Snapshot generation failed!
Target architecture: armeabi-v7a
Command failed: /var/folders/46/3pylpc0j34ggn3jwdz9j54pr0000gn/T/snapshot-tools/mksnapshot-tools/v8-v5.5.372.32/darwin-x64/mksnapshot-arm /Volumes/test_app/test app/platforms/android/app/src/main/assets/app/_embedded_script_.js --startup_blob /Volumes/test_app/test app/platforms/android/app/snapshot-build/build/snapshots/blobs/armeabi-v7a/TNSSnapshot.blob --profile_deserialization
Executing webpack failed with exit code 2.
# 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>] [--bundle [<value>] [--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
<API Level> is a valid Android API level. For example: 22, 23.
@hamdiwanis remove "nativescript-dev-android-snapshot": "^0.*.*",
delete node_modules
, and platforms
and rebuild the applicaiton.
I also meet the error after release. Below is my package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.iceplatform.android",
"tns-android": {
"version": "3.4.2"
}
},
"dependencies": {
"nativescript-camera": "^3.2.1",
"nativescript-cfalert-dialog": "^1.0.5",
"nativescript-checkbox": "^3.0.3",
"nativescript-hprt": "^0.9.6",
"nativescript-imagepicker": "^4.0.1",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-localize": "^2.2.1",
"nativescript-localstorage": "^1.1.5",
"nativescript-masked-text-field": "^2.0.1",
"nativescript-modal-datetimepicker": "^1.0.3",
"nativescript-permissions": "^1.2.3",
"nativescript-phone": "^1.3.1",
"nativescript-plugin-firebase": "^5.1.8",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-listview": "^3.5.0",
"nativescript-ui-sidedrawer": "^3.5.0",
"tns-core-modules": "~3.4.0"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"copy-webpack-plugin": "~4.3.0",
"css-loader": "~0.28.7",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-webpack": "^0.9.2",
"nativescript-worker-loader": "~0.8.1",
"raw-loader": "~0.5.1",
"resolve-url-loader": "~2.2.1",
"uglifyjs-webpack-plugin": "~1.1.6",
"webpack": "~3.10.0",
"webpack-bundle-analyzer": "^2.9.1",
"webpack-sources": "~1.1.0"
}
}
Error shown
ERROR in NativeScriptSnapshot. Snapshot generation failed!
Target architecture: arm64-v8a
Command failed: /var/folders/pj/n516m9p528d0h670q3wwrglm0000gn/T/snapshot-tools/mksnapshot-tools/v8-v5.5.372.32/darwin-x64/mksnapshot-arm64 /Users/abc/Documents/Project/Ice Platform/ys/platforms/android/app/src/main/assets/app/_embedded_script_.js --startup_blob /Users/abc/Documents/Project/Ice Platform/ys/platforms/android/app/snapshot-build/build/snapshots/blobs/arm64-v8a/TNSSnapshot.blob --profile_deserialization
my bundle-config.js
if (global.TNS_WEBPACK) {
require("bundle-entry-points");
const context = require.context("~/", true, /(page|content|fragment)\.(xml|css|js|ts|scss|less|sass)$/);
global.registerWebpackModules(context);
global.registerModule("nativescript-ui-sidedrawer", function() { return require("nativescript-ui-sidedrawer"); });
global.registerModule("nativescript-ui-listview", function() { return require("nativescript-ui-listview"); });
global.registerModule("nativescript-phone", function() { return require("nativescript-phone"); });
global.registerModule("nativescript-permissions", function() { return require("nativescript-permissions"); });
global.registerModule("nativescript-modal-datetimepicker", function() { return require("nativescript-modal-datetimepicker"); });
global.registerModule("nativescript-localstorage", function() { return require("nativescript-localstorage"); });
global.registerModule("nativescript-camera", function() { return require("nativescript-camera"); });
global.registerModule("nativescript-checkbox", function() { return require("nativescript-checkbox"); });
global.registerModule("nativescript-imagepicker", function() { return require("nativescript-imagepicker"); });
global.registerModule("nativescript-loading-indicator", function() { return require("nativescript-loading-indicator"); });
global.registerModule("nativescript-cfalert-dialog", function() { return require("nativescript-cfalert-dialog"); });
global.registerModule("nativescript-hprt", function() { return require("nativescript-hprt"); });
global.registerModule("nativescript-localize", function() { return require("nativescript-localize"); });
global.registerModule("nativescript-masked-text-field", function() { return require("nativescript-masked-text-field"); });
}
Should'nt it be: global.registerModule("nativescript-ui-sidedrawer",() => require("../node_modules/nativescript-ui-sidedrawer")); where all modules are pointing to the nodes_modules folder?
I have the same error. Already cleaned platforms and cleaned node_modules
package.json
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "com.my.app",
"tns-ios": {
"version": "4.1.1"
},
"tns-android": {
"version": "4.1.3"
}
},
"scripts": {
},
"dependencies": {
"@angular/animations": "~6.0.7",
"@angular/common": "~6.0.7",
"@angular/compiler": "~6.0.7",
"@angular/core": "~6.0.7",
"@angular/forms": "~6.0.7",
"@angular/http": "~6.0.7",
"@angular/platform-browser": "~6.0.7",
"@angular/platform-browser-dynamic": "~6.0.7",
"@angular/router": "~6.0.7",
"nativescript-angular": "~6.0.6",
"nativescript-background-gps": "file:../nativescript-background-gps/plugin",
"nativescript-bluetooth": "file:../nativescript-bluetooth/plugin",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-ng-shadow": "^2.1.0",
"nativescript-ngx-fonticon": "^4.2.0",
"nativescript-ripple": "^2.0.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-gauge": "^3.6.0",
"reflect-metadata": "~0.1.12",
"rxjs": "~6.2.1",
"tns-core-modules": "~4.1.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.7.0-rc.0",
"@angular/compiler-cli": "~6.1.0-beta.1",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-sass": "^1.6.0",
"nativescript-dev-typescript": "~0.7.2",
"nativescript-dev-webpack": "^0.14.2",
"tns-platform-declarations": "^4.1.0",
"typescript": "~2.7.2"
}
}
Build log
tns build android --bundle --release --keyStorePath certs/upload.keystore --keyStorePassword ***** --keyStoreAlias app name --keyStoreAliasPassword ***** --env.uglify --env.snapshot --env.aotCopying template files...
⠋ Installing tns-android
+ tns-android@4.1.3
added 1 package in 9.46s
Project successfully created.
Executing before-shouldPrepare hook from ****/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Executing before-prepare hook from ****/hooks/before-prepare/nativescript-dev-sass.js
Hook skipped because either bundling or livesync is in progress.
Executing before-prepare hook from ****/hooks/before-prepare/nativescript-dev-typescript.js
Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from ****/hooks/before-prepareJSApp/nativescript-dev-webpack.js
Running webpack for android...
Project root: ****
Snapshots build directory: ****/platforms/android/app/snapshot-build/build
clean-webpack-plugin:****/platforms/android/app/src/main/assets/app/**/* has been removed.
Snapshotting bundle from ****/platforms/android/app/src/main/assets/app/snapshot-entry.js,****/platforms/android/app/src/main/assets/app/vendor.js
Running snapshot generation with the following arguments:
{
"inputFiles": [
"*****/platforms/android/app/src/main/assets/app/snapshot-entry.js",
"*****/platforms/android/app/src/main/assets/app/vendor.js"
],
"preprocessedInputFile": "*****/platforms/android/app/src/main/assets/app/_embedded_script_.js",
"targetArchs": [
"arm",
"arm64",
"ia32"
],
"useLibs": false
}
Snapshot tools path: /var/folders/0v/_p69syd96plgy916gb3rcqxm0000gn/T/snapshot-tools
Webpack compilation complete.
***** Starting snapshot generation using V8 version: 6.6.346.23
***** Generating snapshot for armeabi-v7a *****
***** Generating snapshot for arm64-v8a *****
***** Generating snapshot for x86 *****
Hash: 26d0aca1b748462f4467
Version: webpack 4.6.0
Time: 32863ms
Built at: 2018-07-03 23:52:37
Asset Size Chunks Chunk Names
App_Resources/Android/src/main/res/drawable-xhdpi/logo.png 54 KiB [emitted]
vendor.js 1.15 MiB 0 [emitted] vendor
bundle.js 80.1 KiB 2 [emitted] bundle
App_Resources/Android/app.gradle 994 bytes [emitted]
App_Resources/Android/src/main/AndroidManifest.xml 1.88 KiB [emitted]
App_Resources/Android/src/main/res/drawable-hdpi/background.png 3.42 KiB [emitted]
App_Resources/Android/src/main/res/drawable-hdpi/icon.png 6.8 KiB [emitted]
App_Resources/Android/src/main/res/drawable-hdpi/logo.png 32.4 KiB [emitted]
App_Resources/Android/src/main/res/drawable-ldpi/background.png 1.31 KiB [emitted]
App_Resources/Android/src/main/res/drawable-ldpi/icon.png 3.23 KiB [emitted]
App_Resources/Android/src/main/res/drawable-ldpi/logo.png 9.95 KiB [emitted]
App_Resources/Android/src/main/res/drawable-mdpi/background.png 1.89 KiB [emitted]
App_Resources/Android/src/main/res/drawable-mdpi/icon.png 3.42 KiB [emitted]
App_Resources/Android/src/main/res/drawable-mdpi/logo.png 15.8 KiB [emitted]
App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml 304 bytes [emitted]
App_Resources/Android/src/main/res/drawable-xhdpi/background.png 5.26 KiB [emitted]
App_Resources/Android/src/main/res/drawable-xhdpi/icon.png 10.4 KiB [emitted]
snapshot-entry.js 4.49 KiB 1 [emitted] snapshot-entry
App_Resources/Android/src/main/res/drawable-xxhdpi/background.png 10.3 KiB [emitted]
App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png 20.3 KiB [emitted]
App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png 116 KiB [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png 3.87 KiB [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png 73.8 KiB [emitted]
App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png 193 KiB [emitted]
App_Resources/Android/src/main/res/values-v21/colors.xml 104 bytes [emitted]
App_Resources/Android/src/main/res/values-v21/styles.xml 902 bytes [emitted]
App_Resources/Android/src/main/res/values/colors.xml 237 bytes [emitted]
App_Resources/Android/src/main/res/values/strings.xml 141 bytes [emitted]
App_Resources/Android/src/main/res/values/styles.xml 1.68 KiB [emitted]
assets/mdi.css 123 KiB [emitted]
fonts/Material Design Icons.ttf 350 KiB [emitted]
package.json 150 bytes [emitted]
starter.js 39 bytes [emitted]
tns-java-classes.js 0 bytes [emitted]
[2] ../node_modules/@angular/router/fesm5/router.js + 13 modules 219 KiB {0} [built]
| 14 modules
[5] ../node_modules/rxjs/_esm5/internal/Observable.js + 1 modules 4.55 KiB {0} [built]
| 2 modules
[6] ../node_modules/rxjs/_esm5/internal/observable/of.js + 1 modules 1.17 KiB {0} [built]
| 2 modules
[14] ../node_modules/rxjs/_esm5/internal/Subscription.js + 2 modules 5.56 KiB {0} [built]
| 3 modules
[15] ../node_modules/rxjs/_esm5/internal/observable/from.js + 5 modules 6.17 KiB {0} [built]
| 6 modules
[59] ../node_modules/rxjs/_esm5/internal/util/subscribeToResult.js + 1 modules 1.47 KiB {0} [built]
| 2 modules
[89] /Volumes/data/dev/nativescript/nativescript-bluetooth/plugin/src/bluetooth.js 422 bytes {2} [built]
[95] ../$$_lazy_route_resource lazy namespace object 160 bytes {1} {2} [built]
[110] ./package.json 136 bytes {1} {2} [optional] [built]
[120] ../node_modules/rxjs/_esm5/index.js + 44 modules 81.2 KiB {0} [built]
| 45 modules
[203] ./app.module.ngfactory.js + 17 modules 92.5 KiB {2} [built]
| ./app.component.js 140 bytes [built]
| ./app.module.ngfactory.js 7.37 KiB [built]
| ./app.routing.js 334 bytes [built]
| ./directives/title-and-nav-button.module.js 184 bytes [built]
| ./app.component.ngfactory.js 1.65 KiB [built]
| ./deviceselect/DeviceSelectComponent.ngfactory.js 5.17 KiB [built]
| ./home/HomeComponent.ngfactory.js 12.1 KiB [built]
| ./app.module.js 625 bytes [built]
| ./home/HomeComponent.js 7.92 KiB [built]
| ./services/BLEService.js 14.3 KiB [built]
| ./handlers/geoHandler.ts 6.35 KiB [built]
| ./deviceselect/DeviceSelectComponent.ts 3.18 KiB [built]
| ./deviceselect/DeviceSelectComponent.js 3.18 KiB [built]
| ./services/BLEService.ts 14.3 KiB [built]
| ./home/HomeComponent.ts 7.92 KiB [built]
| + 3 hidden modules
[220] ./app.scss 3.21 KiB {1} [built]
[223] ../platforms/android/app/snapshot-entry.js 323 bytes {1} [built]
[274] ./main.aot.ts 628 bytes {2} [built]
[275] ../node_modules/rxjs/_esm5/internal/operators/share.js + 1 modules 1.92 KiB {0} [built]
| 2 modules
+ 347 hidden modules
ERROR in NativeScriptSnapshot. Snapshot generation failed!
Target architecture: armeabi-v7a
Command failed: /var/folders/0v/_p69syd96plgy916gb3rcqxm0000gn/T/snapshot-tools/mksnapshot-tools/v8-v6.6.346.23/darwin-x64/mksnapshot-arm *****/platforms/android/app/src/main/assets/app/_embedded_script_.js --startup_blob *****/platforms/android/app/snapshot-build/build/snapshots/blobs/armeabi-v7a/TNSSnapshot.blob --profile_deserialization
Executing webpack failed with exit code 2.
Also how can I make It so it only creates snapshots for Abis I setup in app.gradle
splits.abi
I found the bug! NativeScriptSnapshot does not put the path beetween "
. My project folder name have a space in it. That simply won't work. Removing the space makes it work.
It can be simply fixed on that line. Should I create a PR? Does not seem that necessary for such a simple fix. Thanks
please help me i have the same problem https://discourse.nativescript.org/t/snapshot-generation-failed/6970
@alibahjat do you have a space in your project full path?
@farfromrefug sir can you be more specific
@hamdiwanis is this problem solved ?
@alibahjat please provide a sample project and/or any details related to your issue. The issue as @farfromrefug mentioned might be caused in you have a white space in the name of the app (e.g. "my app" can be renamed to "myapp" to resolve the issue)
I had the same problem and but the error is not only in the space in the name of the app but in the whole route, if it detects that your project is on a route where a folder has a space this will not work, the solution is to rename those folders that have the space