GWT -Test fällt fehl: „Für Typ org.json.jsonObject ist kein Quellcode verfügbar; Haben Sie vergessen, ein erforderlichesJava

Java-Forum
Anonymous
 GWT -Test fällt fehl: „Für Typ org.json.jsonObject ist kein Quellcode verfügbar; Haben Sie vergessen, ein erforderliches

Post by Anonymous »

Ich versuche, eine GWT -Bibliothek mit einem separaten Testmodul zu schreiben, aber wenn ich meinen httpclientTest ausführe, beschwert sich GWT, dass es nicht org.json.jsonObject oder org.json.jsonArray :
-Arstrong> findet. />

Code: Select all













httpclientest.gwt.xml

Code: Select all




json.gwt.xml (in src/main/java/org/json.gwt.xml )

Code: Select all








Projektlayout (vereinfacht):
JSON -Bibliothek

Code: Select all

src/
main/
java/org/JSON.gwt.xml
java/org/json/JSONObject.java
java/org/json/JSONArray.java
< /code>
Httpclient Library < /p>
src/
main/
java/com/mycompany/http/HttpClient.gwt.xml
java/com/mycompany/http/client/HttpClient.java
test/
java/com/mycompany/http/client/HttpClientTest.java
Fehlerausgabe:

Code: Select all

[ERROR] Line 62: No source code is available for type org.json.JSONObject; did you forget to inherit a required module?
[ERROR] Line 86: No source code is available for type org.json.JSONArray; did you forget to inherit a required module?
Ich habe org.json in meinem Hauptmodul geerbt und glaube, der Ort von json.gwt.xml ist korrekt. Was vermisse ich? Wie kann ich GWT dazu bringen, org.json.jsonObject und org.json.jsonArray in meinem Testmodul?

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post