Android Question [SOLVED] Locale problem

makis_best

Active Member
Licensed User
Hi

I try to add in Sub Service_create the locale
B4X:
    Dim jo As JavaObject
    jo.InitializeStatic("java.util.Locale").RunMethod("setDefault", Array(jo.GetField("GR")))
But always I get the error saying

*** Service (starter) Create ***
Error occurred on line: 33 (Starter)
java.lang.RuntimeException: Field: GR not found in: java.util.Locale
at anywheresoftware.b4j.object.JavaObject$FieldCache.getField(JavaObject.java:306)
at anywheresoftware.b4j.object.JavaObject.GetField(JavaObject.java:181)
at gr.iosif.droidview.starter._service_create(starter.java:6321)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:176)
at gr.iosif.droidview.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3216)
at android.app.ActivityThread.-wrap5(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1586)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
** Service (starter) Start **
Why?
 
Top