NativeScript / android

NativeScript for Android using v8
https://docs.nativescript.org/guide/android-marshalling
Apache License 2.0
527 stars 135 forks source link

Snapshot generation broken? Error: android is not defined #1624

Closed jerbob92 closed 4 years ago

jerbob92 commented 4 years ago

Environment

Describe the bug Snapshot generation seems broken because it can't seem to find the android types anymore, I'm getting the error JavaScript execution error: ReferenceError: android is not defined

When checking the line it errors on, it's just a reference to an Android class: }(android.text.style.MetricAffectingSpan));

To Reproduce Upgrade runtimes to 6.5.1, upgrade CLI to 6.7.8 and cross platform to 6.5.8, try to build the app with --env.snapshot and --env.compileSnapshot

Expected behavior The app should build and result into APK's.

Sample project Don't have a sample app only for this bug, but I could also reproduce on a demo of a public plugin of mine: https://github.com/klippa-app/nativescript-http Go into demo-angular and upgrade everything mentioned in To Reproduce, then try to build with snapshots.

mapo80 commented 4 years ago

I've same issue, here you can find more informations: https://github.com/NativeScript/NativeScript/issues/8631

Hope that you'll find how to solve!

farfromrefug commented 4 years ago

@mapo80 i can confirm you correctly pin pointed the issue! It needs a fix on N side

NathanaelA commented 4 years ago

This was fixed in the last NativeScript release that was done today.