NativeScript / NativeScript/android
@Interfaces decorator gives an error "Error executing Static Binding Generator: Class not found"
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 563
- 派生
- 144
- 平均合并
- 10 小时 46 分钟
- 30 天内合并 PR
- 14
描述
Environment:
Nativescript: 6.7.8
tns-core-modules: 6.0.1
tns-andoird: 6.5.3
Issue:
I am implementing Java Interface in my Nativescript-angular application for android. I have added Java android plugin dependency in the app.gradle file. I get a build (tns build android) error for @Interfaces decorator.
Build error during "tns build android"
"Error executing Static Binding Generator: Class not found global.com.microsoft.identity.client.IPublicClientApplication.ISingleAccountApplicationCreatedListener"
If I execute below steps then I dont see any issue.
- "tns run android --no-hmr"
- Application built and started successfully
- Perform necessary @Interfaces related changes in the TS file
- Automatically starts the incremental build
- I dont see any error and my code works fine.
app.gradle:
dependencies {
implementation "com.microsoft.identity.client:msal:1.2.+"
}
TS file:
declare var global: any;
@Interfaces([global.com.microsoft.identity.client.IPublicClientApplication.ISingleAccountApplicationCreatedListener])
export class SingleAccount extends java.lang.Object {
mSingleAccountApp;
constructor() {
super();
// necessary when extending TypeScript constructors
return global.__native(this);
}
onCreated(application): void {
//some code
}
onError(exception): void {
////some code
}
}
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先重现干净状态下 tns build android 的失败,以及成功的 tns run android --no-hmr 流程。检查 app.gradle 中的依赖项和 TypeScript @Interfaces 声明,然后跟踪针对 IPublicClientApplication.ISingleAccountApplicationCreatedListener 的 Static Binding Generator 错误。完成的标准是该接口能够从干净构建中成功构建,而不仅仅是增量构建。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, java, typescript
- 领域
- build-system, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100