Error when run app in android


#1

hello
i got this error when run app in android

please help me

    [emitted]
 [18] ./api/api.ts 2.4 KiB {2} [built]
[132] ../$$_lazy_route_resource lazy namespace object 160 bytes {1} {2} [built]
[146] ./package.json 140 bytes {1} {2} [optional] [built]
[151] ./app.routing.ts + 13 modules 42.3 KiB {2} [built]
      | ./app.routing.ts 1.76 KiB [built]
      | ./common/support.ts 1.11 KiB [built]
      |     + 12 hidden modules
[153] ./app.component.ts 768 bytes {2} [built]
[337] ./app.css 634 bytes {1} [optional] [built]
[338] . sync nonrecursive ^\.\/app\.(css|scss|less|sass)$ 174 bytes {1} [built]
[340] ../platforms/android/app/snapshot-entry.js 287 bytes {1} [built]
[667] ./app.component.html 2.66 KiB {2} [built]
[728] ./main.ts 4.3 KiB {2} [built]
    + 719 hidden modules
Built aar for nativescript-barcodescanner
Built aar for nativescript-phone
Built aar for nativescript-social-share
Project successfully prepared (Android)
Executing after-prepare hook from /D/nativescript/luce/hooks/after-prepare/nativescript-dev-webpack.js
Building project...
Gradle build...
         + setting applicationId
         + applying user-defined configuration from /D/nativescript/luce/app/App_Resources
/Android/app.gradle
         + adding nativescript runtime package dependency: nativescript-optimized
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/nativescript-ba
rcodescanner/platforms/android/nativescript_barcodescanner.aar
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/nativescript-barcodescanner/platforms/android/barcodescanner-release-2.1.6.aar
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/nativescript-phone/platforms/android/nativescript_phone.aar
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/nativescript-social-share/platforms/android/nativescript_social_share.aar
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/nativescript-ui-sidedrawer/platforms/android/TNSSideDrawer-release.aar
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
         + adding aar plugin dependency: /D/nativescript/luce/node_modules/nativescript-ui-core/platforms/android/TNSCore-release.aar
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Project successfully built.
Installing...
Successfully installed on device with identifier 'emulator-5554'.
Starting...
Successfully started on device with identifier 'emulator-5554'.
ActivityManager: Start proc 7114:com.lamassu.luce/u0a106 for activity com.lamassu.luce/com.tns.NativeScriptActivity
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: TypeError: e.createElement is not a function
System.err: File: "<embedded>, line: 37, column: 1623382
System.err:
System.err: StackTrace:
System.err:     Frame: function:'e.canUseReadyStateChange', file:'<embedded>', line: 37, column: 1623383
System.err:     Frame: function:'e', file:'<embedded>', line: 37, column: 1622758
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1625955
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1626194
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1190647
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627025
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627685
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628005
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628134
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1531344
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'151', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 11800
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 47073
System.err:     Frame: function:'728', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 48812
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'e', file:'<embedded>', line: 36, column: 391
System.err:     Frame: function:'r', file:'<embedded>', line: 36, column: 252
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 107
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/starter.js', line: 2, column: 1
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: TypeError: e.createElement is not a function
System.err: File: "<unknown>, line: 1, column: 265
System.err:
System.err: StackTrace:
System.err:     Frame: function:'e.canUseReadyStateChange', file:'<embedded>', line: 37, column: 1623383
System.err:     Frame: function:'e', file:'<embedded>', line: 37, column: 1622758
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1625955
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1626194
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1190647
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627025
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627685
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628005
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628134
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1531344
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'151', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 11800
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 47073
System.err:     Frame: function:'728', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 48812
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'e', file:'<embedded>', line: 36, column: 391
System.err:     Frame: function:'r', file:'<embedded>', line: 36, column: 252
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 107
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/starter.js', line: 2, column: 1
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: TypeError: e.createElement is not a function
System.err: File: "<unknown>, line: 1, column: 265
System.err:
System.err: StackTrace:
System.err:     Frame: function:'e.canUseReadyStateChange', file:'<embedded>', line: 37, column: 1623383
System.err:     Frame: function:'e', file:'<embedded>', line: 37, column: 1622758
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1625955
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1626194
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1190647
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627025
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627685
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628005
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628134
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1531344
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'151', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 11800
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 47073
System.err:     Frame: function:'728', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 48812
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'e', file:'<embedded>', line: 36, column: 391
System.err:     Frame: function:'r', file:'<embedded>', line: 36, column: 252
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 107
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/starter.js', line: 2, column: 1
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5743)
System.err:     at android.app.ActivityThread.-wrap1(Unknown Source:0)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
System.err:     at android.os.Looper.loop(Looper.java:164)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:6494)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
System.err: Caused by: com.tns.NativeScriptException:
System.err:
System.err: Error calling module function
System.err:
System.err: Error calling module function
System.err:
System.err: TypeError: e.createElement is not a function
System.err: File: "<embedded>, line: 37, column: 1623382
System.err:
System.err: StackTrace:
System.err:     Frame: function:'e.canUseReadyStateChange', file:'<embedded>', line: 37, column: 1623383
System.err:     Frame: function:'e', file:'<embedded>', line: 37, column: 1622758
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1625955
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1626194
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1190647
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627025
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627685
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628005
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628134
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1531344
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'151', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 11800
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 47073
System.err:     Frame: function:'728', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 48812
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'e', file:'<embedded>', line: 36, column: 391
System.err:     Frame: function:'r', file:'<embedded>', line: 36, column: 252
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 107
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/starter.js', line: 2, column: 1
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: TypeError: e.createElement is not a function
System.err: File: "<unknown>, line: 1, column: 265
System.err:
System.err: StackTrace:
System.err:     Frame: function:'e.canUseReadyStateChange', file:'<embedded>', line: 37, column: 1623383
System.err:     Frame: function:'e', file:'<embedded>', line: 37, column: 1622758
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1625955
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1626194
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1190647
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627025
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627685
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628005
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628134
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1531344
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'151', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 11800
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 47073
System.err:     Frame: function:'728', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 48812
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'e', file:'<embedded>', line: 36, column: 391
System.err:     Frame: function:'r', file:'<embedded>', line: 36, column: 252
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 107
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/starter.js', line: 2, column: 1
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:
System.err: TypeError: e.createElement is not a function
System.err: File: "<unknown>, line: 1, column: 265
System.err:
System.err: StackTrace:
System.err:     Frame: function:'e.canUseReadyStateChange', file:'<embedded>', line: 37, column: 1623383
System.err:     Frame: function:'e', file:'<embedded>', line: 37, column: 1622758
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1625955
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1626194
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1190647
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627025
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1627685
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628005
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1628134
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'<embedded>', line: 37, column: 1531344
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'151', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 11800
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 47073
System.err:     Frame: function:'728', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 48812
System.err:     Frame: function:'u', file:'<embedded>', line: 36, column: 515
System.err:     Frame: function:'e', file:'<embedded>', line: 36, column: 391
System.err:     Frame: function:'r', file:'<embedded>', line: 36, column: 252
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/bundle.js', line: 1, column: 107
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:     Frame: function:'', file:'file:///data/data/com.lamassu.luce/files/app/starter.js', line: 2, column: 1
System.err:     Frame: function:'require', file:'', line: 1, column: 266
System.err:
System.err:     at com.tns.Runtime.runModule(Native Method)
System.err:     at com.tns.Runtime.runModule(Runtime.java:542)
System.err:     at com.tns.Runtime.run(Runtime.java:534)
System.err:     at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
System.err:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1119)
System.err:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5740)
System.err:     ... 8 more
ActivityManager: Killing 7114:com.lamassu.luce/u0a106 (adj 900): crash

my package json is

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "com.ali.ali",
    "tns-ios": {
      "version": "4.1.1"
    },
    "tns-android": {
      "version": "4.1.3"
    }
  },
  "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.3.0",
    "nativescript-app-tour": "^0.9.1",
    "nativescript-barcodescanner": "^2.7.7",
    "nativescript-carousel": "^3.1.1",
    "nativescript-fancyalert": "^1.2.0",
    "nativescript-gif": "^4.0.0",
    "nativescript-image-swipe": "^3.0.0",
    "nativescript-image-zoom": "^3.0.0",
    "nativescript-loading-indicator": "^2.4.0",
    "nativescript-ng2-slides": "0.0.11",
    "nativescript-onesignal": "^1.0.7",
    "nativescript-phone": "^1.3.1",
    "nativescript-social-share": "^1.5.0",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-sidedrawer": "^4.1.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "~5.5.5",
    "tns-core-modules": "^4.1.0",
    "tns-core-modules-widgets": "^4.1.0",
    "tns-platform-declarations": "^4.1.0",
    "zone.js": "~0.8.18"
  },
  "devDependencies": {
    "@angular-devkit/core": "~0.6.3",
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "~5.2.0",
    "@ngtools/webpack": "~6.0.3",
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "clean-webpack-plugin": "~0.1.19",
    "copy-webpack-plugin": "~4.5.1",
    "css-loader": "~0.28.11",
    "extract-text-webpack-plugin": "~3.0.2",
    "lazy": "1.0.11",
    "nativescript-css-loader": "~0.26.0",
    "nativescript-dev-typescript": "~0.7.0",
    "nativescript-dev-webpack": "^0.12.0",
    "nativescript-worker-loader": "~0.9.0",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~2.3.0",
    "typescript": "~2.7.2",
    "uglifyjs-webpack-plugin": "~1.2.5",
    "webpack": "~4.6.0",
    "webpack-bundle-analyzer": "~2.13.0",
    "webpack-cli": "~2.1.3",
    "webpack-sources": "~1.1.0"
  },
  "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"
  }
}

#2

please help me to solve problem


#3

Does this happen in non webpack build?
Are you using createElement anywhere in your code?


#4

thanks alot for reply
this problem only happen if i build release with --env.snapshot in android
i dont use createElement
i only use register element in main.ts


#5

Are you on Mac or Windows?


#6

mac high sierra system


#7

Did you double check your rxjs imports - are you using right paths valid for rxjs 6?

Also are you accessing any direct native apis in your project?


#8

i use this rxjs imports

import * as Rx from “rxjs”;

import ‘rxjs/add/operator/map’

import { map } from “rxjs/operators”;

import ‘rxjs/add/operator/timeout’;

import ‘rxjs/add/operator/do’;


#9

i access to camera to get qr scaner
and onesignal notifications

this my main.ts model

// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
import { NgModule, enableProdMode } from "@angular/core";
import { AppComponent } from "./app.component";
import { NativeScriptRouterModule } from "nativescript-angular/router";
import { appComponents, appRoutes } from "./app.routing";
import { NativeScriptUISideDrawerModule } from "nativescript-ui-sidedrawer/angular";
import { BarcodeScanner } from "nativescript-barcodescanner";
import { Api } from "~/api/api";
import { NativeScriptHttpModule, platformNativeScriptDynamic } from "nativescript-angular";
import * as application from 'application';
import { HttpModule } from "@angular/http";
import {HttpClientModule, HttpClient} from '@angular/common/http';
import { RouterExtensions } from "nativescript-angular/router";
import { Gif } from "nativescript-gif";
import { registerElement } from "nativescript-angular/element-registry";




var TnsOneSignal = require('nativescript-onesignal').TnsOneSignal
 

enableProdMode();






application.on(application.resumeEvent, (args) => {
    if (args.android) {
        
        // For Android applications, args.android is an android activity class.

    } else if (args.ios) {
        // For iOS applications, args.ios is UIApplication.

    }
  
});




if ( application.ios ) {
            class MyDelegate extends UIResponder implements UIApplicationDelegate {
                public static ObjCProtocols = [UIApplicationDelegate];
                applicationDidFinishLaunchingWithOptions(application: UIApplication, launchOptions: NSDictionary<any, any>): boolean {
                    try {
                        //console.log('TnsOneSignal', TnsOneSignal);
                        TnsOneSignal.initWithLaunchOptionsAppId(launchOptions, '3dcb104f-3wwwf-dsd2-wqwqw-fsdfwer23423');
                    } catch (error) {
                        console.error('error', error);
                    }
                    return true;
                }
                applicationDidBecomeActive(application: UIApplication): void {
                    //console.log("applicationDidBecomeActive: " + application);
                }
            }
            application.ios.delegate = MyDelegate;
        }
if (application.android) {
    application.on(application.launchEvent, function(args: application.ApplicationEventData) {
 
        try {
 
            TnsOneSignal.startInit(application.android.context)
            .setNotificationReceivedHandler(new TnsOneSignal.NotificationReceivedHandler({
                notificationReceived: notification => {
                    console.log(notification.payload.title);
                }
            }))
            .init();
       
 
            
            
        } catch (error) {
            console.error('error', error)
        }
 
    })
} 

registerElement("ImageSwipe", () => require("nativescript-image-swipe/image-swipe").ImageSwipe);
registerElement('ImageZoom', () => require('nativescript-image-zoom').ImageZoom);
registerElement("BarcodeScanner", () => require("nativescript-barcodescanner").BarcodeScannerView);
registerElement("Gif", () => Gif);

registerElement("Carousel", () => require("nativescript-carousel").Carousel);
registerElement("CarouselItem", () => require("nativescript-carousel").CarouselItem);
@NgModule({
    



    
    declarations: [AppComponent, ...appComponents],
    bootstrap: [AppComponent],
    imports: [
        NativeScriptUISideDrawerModule,
        NativeScriptModule,
        NativeScriptRouterModule,
        NativeScriptHttpModule,
        HttpModule,
        HttpClientModule,
        NativeScriptRouterModule.forRoot(appRoutes)
    ],
    providers: [
        BarcodeScanner,
        Api,   
      ]
})
class AppComponentModule {}

platformNativeScriptDynamic().bootstrapModule(AppComponentModule);

#10

I just noticed you are using rxjs 5.x only. Can you try commenting out rxjs imports and related code just to see if that solves the problem so you will have a direction to debug further.


#11

i tried uncomment rxjs and the problem still exists
please help me