NativeScript / NativeScript/android
@Interfaces decorator gives an error "Error executing Static Binding Generator: Class not found"
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C++
- Sterne
- 563
- Forks
- 144
- Ø Merge
- 10 Std. 46 Min.
- Gemergte PRs (30 T.)
- 14
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.
- "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
}
}
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
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.
Bewertung
- Tech-Stack
- android, java, typescript
- Bereich
- build-system, mobile-dev
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100