我有一个遗留类,其中包含 toLowerCase( Locale.ENGLISH )
当我在客户端使用这个类时,我得到
[ERROR] [onboardingtool] Line 37: The method toLowerCase() in the type String is not applicable for the arguments (Locale)
但是当我查看 GWT 文档时,似乎已经支持 ROOT
、US
和 ENGLISH
。
这是链接:http://www.gwtproject.org/doc/latest/RefJreEmulation.html (搜索“本地化”)
我正在使用 GWT 2.6.1。我如何让它发挥作用?
最佳答案
Locale
仅在 GWT 2.7.0 (RC1) 及更高版本中受支持。
Here are the release notes of GWT 2.7.0 (RC1) ,具体来说:
“新模拟类:Locale
、NavigableSet
和 NavigableMap
”
和
“Class
、String
中的新模拟方法……”
如果您使用的是 GWT 2.6.1,Locale
和 String#toLowerCase(Locale)
将不可用。
关于java - GWT:如何在客户端使用 Locale.ENGLISH?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28966560/