I am working on a nativescript plugin around a native Android SDK. I have to subclass a native android abstract class Given below is the way I did this: -
declare var com: any;
class MyCallBackClass extends com.xy.ab.mn.somesdk {
//com.xy.ab.mn.somesdk is from third party native android library and is an abstract class
//overridden methods and other variables
}
class MySDKClass {
myCallBack: any;
constructor() {
this.myCallBack = new MyCallBackClass()
}
}
All of this is done in a plugin. When I debug the plugin using the command npm run plugin.tscwatch
, everything works fine. But when I pack the plugin into a .tgz
file and use it in my app I am getting the following error: -
When I run the application, I am getting a runtime error as follows: -
System.err: TypeError: Cannot read property 'ab' of undefined
If anyone has faced the above issue and have a solution, please help.
Thanks in advance.