I am trying to issue a HTTP request to get some JSON data and leverage it in my Android application only the moment I am adding the code which retrieves data of which the logic is defined in a SharedProject:
An exception occurred in XAndroid, thread 0114 ()
Type: java.lang.IllegalAccessException
Message:
java.lang.Class<com.android.org.conscrypt.OpenSSLSocketFactoryImpl> is not accessible from java.lang.Class<javax.net.ssl.SSLSocketFactory>
Call Stack:
0000000000000000 , Class.newInstance() ( 0)
0000000000000000 , SSLSocketFactory.getDefault() (SSLSocketFactory.java 138)
0000000000000000 , HttpsURLConnection.getDefaultSSLSocketFactory() (HttpsURLConnection.java 343)
0000000000000000 , HttpsHandler.createHttpsOkUrlFactory() (HttpsHandler.java 92)
0000000000000000 , HttpsHandler.newOkUrlFactory() (HttpsHandler.java 53)
0000000000000000 , HttpHandler.openConnection() (HttpHandler.java 44)
0000000000000000 , URL.openConnection() ( 0)
0000000000000000 , Http$1.$ExecuteRequest$b__0() ( 0)
0000000000000000 , Http$2.run() ( 0)
0000000000000000 , Task.run() ( 0)
0000000000000000 , ThreadPoolExecutor.runWorker() ( 0)
0000000000000000 , ThreadPoolExecutor$Worker.run() ( 0)
0000000000000000 , Thread.run() ( 0)
now I can continue this exception and have to admit not sure why I can continue this but then I am getting this exception where it says an illegal argument is given for Currency
. I am not sure where this is coming from.
If I look at the call stack it looks something is happening in JsonDeserializer
's ReadValue
-method but when I look into the source of this method at https://github.com/remobjects/RTL2/blob/daa5908eff18f181fa2492dbe4e1acf7334b0e45/Source/Json/JsonDeserializer.pas#L120. I am unable to find a reference to Locale
or Currency
. I assume it’s the call to Convert.ToDoubleInvariant
.
I am wondering this exception is triggered by https://github.com/remobjects/RTL2/blob/3b9cf4ab0634586063e1922f21f9b5b9df504f3b/Source/Convert.pas#L629?
Do I need to do something special in Android? Maybe I need to run the emulator in a special way? Currently, it’s being ran as: /Users/x/Library/Android/sdk/emulator/emulator -avd Nexus_5X_API_27_x86 -verbose
. Do I need to force my application with a specific Locale?
An exception occurred in XAndroid, thread 0135 ()
Type: java.lang.IllegalArgumentException
Message:
Unsupported ISO 3166 country:
Call Stack:
0000000000000000 , Currency.getInstance() ( 0)
0000000000000000 , Locale.<init>() ( 0)
0000000000000000 , Locale.getInvariant() ( 0)
0000000000000000 , JsonDeserializer.ReadValue() ( 0)
0000000000000000 , JsonDeserializer.ReadPropery() ( 0)
0000000000000000 , JsonDeserializer.ReadProperties() ( 0)
0000000000000000 , JsonDeserializer.ReadObject() ( 0)
0000000000000000 , JsonDeserializer.ReadValue() ( 0)
0000000000000000 , JsonDeserializer.ReadValues() ( 0)
0000000000000000 , JsonDeserializer.ReadArray() ( 0)
0000000000000000 , JsonDeserializer.Deserialize() ( 0)
0000000000000000 , JsonDocument.FromBinary() ( 0)
0000000000000000 , HttpResponse$7.$GetContentAsJson$b__0() ( 0)
0000000000000000 , HttpResponse$8.Invoke() ( 0)
0000000000000000 , HttpResponse$3.$GetContentAsBinary$b__0() ( 0)
0000000000000000 , HttpResponse$4.run() ( 0)
0000000000000000 , Task.run() ( 0)
0000000000000000 , ThreadPoolExecutor.runWorker() ( 0)
0000000000000000 , ThreadPoolExecutor$Worker.run() ( 0)
0000000000000000 , Thread.run() ( 0)