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

Offen
#1,638 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
android, java, typescript

Rechercherichtung

Beginne damit, den Fehler bei einem sauberen tns build android nachzustellen und den erfolgreichen Ablauf tns run android --no-hmr zu reproduzieren. Untersuche die Abhängigkeit in app.gradle und die TypeScript-@Interfaces-Deklaration und verfolge anschließend den Fehler des Static Binding Generator für IPublicClientApplication.ISingleAccountApplicationCreatedListener. Die Aufgabe ist abgeschlossen, wenn das Interface aus einem sauberen Build erfolgreich erstellt werden kann, nicht nur inkrementell.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
C++
Sterne
563
Forks
144
Ø Merge
10 Std. 46 Min.
Gemergte PRs (30 T.)
14

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus NativeScript/android

Alle Issues in NativeScript/android

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.