Wie kann ich die GWT -Reflexion für die LIBGDX -HTML -App implementieren?Java

Java-Forum
Guest
 Wie kann ich die GWT -Reflexion für die LIBGDX -HTML -App implementieren?

Post by Guest »

Ich entwickle Java -Spiel mit libgdx Framework (unter Verwendung der neuesten Version 1.13.1). Meine App unterstützt Desktop/Android/HTML5. Mit Desktop und Android funktioniert es gut. Bei HTML (GWT) habe ich einige (Reflexions-) Probleme getroffen. Das Problem besteht nur beim Ausführen von HTML -App: < /p>

Code: Select all

public HashMap items = new HashMap(); // items data by uuid.toString
...
try {
strJson = json.toJson(items, HashMap.class);
} catch (Exception e) {
logError("savePrefsItems: Exception: "+e.getMessage());
//throw new RuntimeException(e);
} finally {
if (strJson != null) {
prefs.putString("items", strJson);
prefs.flush();
}
}
< /code>
Ergebnisse (Browserkonsole -Protokoll) sind < /p>

schwerwiegend: SavePrefStems: Ausnahme: Der Typ für die Klasse kann nicht finden. ru.miraonline.spaceshooter.classes.entity.Iteminfo '< /p>
< /blockquote>
OK, ich habe versucht, etwas zu finden und fand: libgdx Reflexion im GWT -Artikel. Wie beschrieben, sollte ich zu meiner GDXDEFINITION.GWT.XML (AT HTML Modul Root) Zeile < /p>
hinzufügen. 
< /code>
Um alle Klassen in meinen Klassen zu reflektieren. Hinzufügen dieser Zeile ist jedoch Casusus "html: dist" so, dass sie mit neuen Fehlern fehlschlagen (also kann ich einfach keine HTML -App erstellen): < /p>
> Tracing compile failure path for type 'com.badlogic.gwtref.client.IReflectionCache2Generated'
> [ERROR] Errors in 'generated://A71AD49640388FBBCB5BE8CD1E96DD83/com/badlogic/gwtref/client/IReflectionCache2Generated.java'
> [ERROR] Line 19533: ru.miraonline.spaceShooteres cannot be resolved to a type
> [ERROR] Line 19632: ru.miraonline.spaceShooteres cannot be resolved to a type
> [ERROR] Line 19578: ru.miraonline.spaceShooteres cannot be resolved to a type
> ...
> [ERROR] Hint: Check that the type name 'com.badlogic.gwtref.client.IReflectionCache2Generated' is really what you meant
> [ERROR] Hint: Check that your classpath includes all required source roots
> [ERROR] Errors in 'com/badlogic/gwtref/client/ReflectionCache.java'
> [ERROR] Line 23: Rebind result 'com.badlogic.gwtref.client.IReflectionCache2Generated' could not be found
< /code>
[list]
[*] Die vollständige Auflistung von GDxDefinition.gwt.xml < /code> (es ist standardmäßig 2 Zeilen: 1- Erben GWT.Logger, 2 Problemlinie ) < /li>
< /ol>

































Projektstruktur ist Standard, generiert mein neuestes „Liftoff“-Tool für die Module Android, Desktop, HTML, iOS

Image

[*]Für mich ist das ein Unsinn, Was ist „ru.miraonline.spaceShooter“ im Build-Fehlerprotokoll? Ich habe eine Textsuche in Dateien durchgeführt und nur einmal den Ort gefunden: html/build/gwt/cache/.. (frisch generierte Cache-Datei)

[/list]

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post