You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 7, 2021. It is now read-only.
✔ Component nativescript has 6.1.0 version and is up to date.
✔ Component tns-core-modules has 6.1.0 version and is up to date.
✔ Component tns-android has 6.1.0 version and is up to date.
✔ Component tns-ios has 6.1.0 version and is up to date.
node -v
v12.8.0
Relvant section of webpack.config.js
// Add your custom Activities, Services and other Android app components here.
const appComponents = [
"tns-core-modules/ui/frame",
"tns-core-modules/ui/frame/activity",
resolve(__dirname, "src/app/call-state-listener.ts"),
];
call-state-listener.ts:
@JavaProxy('com.company.BroadcastReceiver.CallStateListener')
export class CallStateListener extends android.content.BroadcastReceiver {
constructor() {
super();
global.__native(this); // necessary in TS constructors if extending native class
}
public onReceive(context: android.content.Context, intent: android.content.Intent) {
}
}
It is recommend to set noEmitHelpers: true regardless if you building with env.uglify or extending platform native classes. More info can be found here.
However, I'm glad to hear you resolved your issue so I'm closing this thread.
Environment
tns info
✔ Component nativescript has 6.1.0 version and is up to date.
✔ Component tns-core-modules has 6.1.0 version and is up to date.
✔ Component tns-android has 6.1.0 version and is up to date.
✔ Component tns-ios has 6.1.0 version and is up to date.
node -v
v12.8.0
Relvant section of webpack.config.js
call-state-listener.ts:
AndroidManifest.xml
Describe the bug
When using the --env.uglify flag, the generated .class-file is missing from the apk-file.
Without the flag, it works fine.
Might be related to #564
The text was updated successfully, but these errors were encountered: