NativeScript / NativeScript/android

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

オープン
#1,638 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C++
スター
563
フォーク
144
平均マージ
10時間 46分
マージ済み PR(30日)
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.

  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
}
}

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。