Closed langsmith closed 6 years ago
The crash is in the Endpoint
class https://github.com/BorderCloud/SPARQL-JAVA/blob/805483e559c0ba69a9b07a7552031329ba444c6f/src/com/bordercloud/sparql/Endpoint.java#L379
I found this doc http://hc.apache.org/httpcomponents-client-4.3.x/android-port.html
You need to use in android this line for http-client in grable :
dependencies {
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
}
I made a new version for android (only get for the moment). https://github.com/BorderCloud/SPARQL-ANDROID
Great, thank you @BorderCloud !
no i have still error
that my Logcat
12:50:56.780 6465-6586/com.creativeera.google.mutalfunds E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.creativeera.google.mutalfunds, PID: 6465
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:325)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: java.lang.NoSuchFieldError: No field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar:classes2.dex)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
It"s not the same error. You need to create a new issue and show how to reproduce this error (with an accessible endpoint and query).
no i have still error too that my logcat
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
I use implementation files('libs/httpcore-4.4.1.jar') ,but is must
@waning007 you need to use https://github.com/BorderCloud/SPARQL-ANDROID for Android. Android doesn't support httpcore.
08-15 12:33:29.028 10731-10731/ai.nuralogix.nura E/AndroidRuntime: FATAL EXCEPTION: main
Process: ai.nuralogix.nura, PID: 10731
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar!classes2.dex)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.
@babyeldhose Do you test for Android this lib https://github.com/BorderCloud/SPARQL-ANDROID ?
Crash when I try to make a Wikidata query