PeterStaev / NativeScript-Grid-View

A NatvieScript GridView widget.
Apache License 2.0
49 stars 28 forks source link

Android release build fails #29

Closed knusperkrone closed 6 years ago

knusperkrone commented 7 years ago

I am trying to extends the grid-view, with an drag and drop listener. Everything is working fine on debug, but when I building with "tns build android --release ...", I get an runtime error. So made a release build of your demo-ng app and got an equivalent runtime-error there:

System.err: TypeError: Cannot read property 'OnScrollListener' of undefined System.err: File: ", line: 1, column: 265 System.err: StackTrace: System.err: Frame: function:'', file:'file:///data/data/com.tangrainc.nggridviewsample/files/app/tns_modules/nativescript-grid-view/grid-view.js', line: 198, column: 41 System.err: Frame: function:'require', file:'', line: 1, column: 266 System.err: Frame: function:'', file:'file:///data/data/com.tangrainc.nggridviewsample/files/app/tns_modules/nativescript-grid-view/angular/grid-view-comp.js', line: 8, column: 19 System.err: Frame: function:'require', file:'', line: 1, column: 266 System.err: Frame: function:'', file:'file:///data/data/com.tangrainc.nggridviewsample/files/app/tns_modules/nativescript-grid-view/angular/index.js', line: 4, column: 24 System.err: Frame: function:'require', file:'', line: 1, column: 266 System.err: Frame: function:'', file:'file:///data/data/com.tangrainc.nggridviewsample/files/app/app.module.js', line: 14, column: 17 System.err: Frame: function:'require', file:'', line: 1, column: 266 System.err: Frame: function:'', file:'file:///data/data/com.tangrainc.nggridviewsample/files/app/main.js', line: 5, column: 20 System.err: Frame: function:'require', file:'', line: 1, column: 266 System.err: at com.tns.Runtime.runModule(Native Method) System.err: at com.tns.Runtime.runModule(Runtime.java:530) System.err: at com.tns.Runtime.run(Runtime.java:522) System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:19) System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)

Am I missing something on gradle or typing?

PeterStaev commented 7 years ago

Hey @knusperkrone , I was able to reproduce this, but sadly I'm not sure what is causing this one but I suspect it is some problem with the NativeScript CLI/runtime. I've added https://github.com/NativeScript/nativescript-cli/issues/3155 so we will see what will be the input of the NativeScript team.

mobilemindtec commented 6 years ago

Hi,

I had same problem, so I add this in build.gradle and its work:

compile "com.android.support:recyclerview-v7:$supportVer"
compile "com.android.support:design:$supportVer"