Trong khi biên dịch ứng dụng libgdx tôi trong nhật thực tôi cứ bị lỗi này:Phương pháp nanoTime() là undefined cho các loại hệ thống trong GWT
[ERROR] Errors in 'file:/C:/Users/Zorfie/Programing/Java/workspace/Libgdx/src/sim/states/BasicBox2DState.java'
[ERROR] Line 157: The method nanoTime() is undefined for the type System
[ERROR] Line 159: The method nanoTime() is undefined for the type System
[ERROR] Line 160: The method nanoTime() is undefined for the type System
[ERROR] Line 161: The method nanoTime() is undefined for the type System
[ERROR] Errors in 'jar:file:/C:/Program%20Files/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201203300216-rel-r37/gwt-2.4.0/gwt-user.jar!/com/google/web/bindery/autobean/shared/impl/StringQuoter.java'
[ERROR] Line 21: The import org.json cannot be resolved
[ERROR] Line 69: JSONObject cannot be resolved
[ERROR] Errors in 'jar:file:/C:/Program%20Files/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201203300216-rel-r37/gwt-2.4.0/gwt-user.jar!/com/google/web/bindery/autobean/vm/impl/JsonSplittable.java'
[ERROR] Line 23: The import org.json cannot be resolved
[ERROR] Line 24: The import org.json cannot be resolved
[ERROR] Line 25: The import org.json cannot be resolved
[ERROR] Line 40: JSONObject cannot be resolved to a type
[ERROR] Line 47: JSONObject cannot be resolved to a type
nào ngụ ý rằng GWT không hỗ trợ .nanoTime(), là thế này trường hợp hoặc tôi chỉ đơn giản là chạy với JRE sai? (Tôi đã kiểm tra dự án và nó nói là 1.6).
[ 'System.nanoTime()'] (http://docs.oracle.com/javase/7/docs/api/java/lang/System.html# nanoTime()) đã có trong JDK từ Java 1.5, vì vậy chắc chắn không phải là trường hợp JRE của bạn quá cũ. –
Tôi có cùng lỗi với String.format. : D – Emerald214