Nativescript: 'tns build android' issue breaks application

Created on 17 Apr 2020  路  1Comment  路  Source: NativeScript/NativeScript

Environment

  • CLI: 6.4
  • Cross-platform modules:
  • Android Runtime: 6.4.1
  • iOS Runtime:
  • Plugin(s):

Describe the bug
I built an android app bundle (.aab) and installed it on my phone. That was when I noticed that half of my pages were blank for no reason. The reason for this was that in some pages I had a "$parents['BottomNavigation']" reference in order to use certain properties from my root binding context, so I checked command parameters and problem was gone when I removed '--env.uglify'.

To Reproduce
Add a '$parents' root binding inside one of application pages (e.g. $parents['Frame']).
Then, build and install application using the following command:
tns build android --release --bundle --env.uglify --key-store-path --key-store-password --key-store-alias --key-store-alias-password --aab

Execute command again after removing '--env.uglify' to notice the difference.

Expected behavior
Bundle should be exported without issues.

Sample project

binding bug

Most helpful comment

A correct description of this issue has been made here: https://github.com/NativeScript/nativescript-dev-webpack/issues/1142

>All comments

A correct description of this issue has been made here: https://github.com/NativeScript/nativescript-dev-webpack/issues/1142

Was this page helpful?
0 / 5 - 0 ratings