NativeScript / NativeScript/android

@Interfaces decorator gives an error "Error executing Static Binding Generator: Class not found"

Đang mở
#1,638 9 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
C++
Star
563
Fork
144
Merge trung bình
10 giờ 46 phút
Pull request đã merge (30 ngày)
14

Mô tả

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.

  1. "tns run android --no-hmr"
  2. Application built and started successfully
  3. Perform necessary @Interfaces related changes in the TS file
  4. Automatically starts the incremental build
  5. 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
}
}

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi của tns build android trong trạng thái sạch và luồng chạy thành công của tns run android --no-hmr. Kiểm tra dependency trong app.gradle và khai báo TypeScript @Interfaces, sau đó lần theo lỗi của Static Binding Generator đối với IPublicClientApplication.ISingleAccountApplicationCreatedListener. Công việc được hoàn tất khi interface có thể được build thành công từ một clean build, không chỉ theo cách incremental.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
android, java, typescript
Lĩnh vực
build-system, mobile-dev
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.