If a project which has the line: useLibrary 'org.apache.http.legacy' in build.gradle file, the user will notice that whenever decides to use a get request using an AsyncTask from web the following error occurs:
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask
java.lang.RuntimeException: An error occurred while executing doInBackground()
Caused by: java.lang.NoSuchMethodError: No virtual method execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/client/methods/CloseableHttpResponse; in class Lorg/apache/http/impl/client/DefaultHttpClient; or its super classes (declaration of 'org.apache.http.impl.client.DefaultHttpClient' appears in /system/framework/org.apache.http.legacy.boot.jar)
This happens because one of the imports from this project
implementation 'ai.api:sdk:2.0.7@aar'
implementation 'ai.api:libai:1.6.12'
already contains a httpclient class.
If a project which has the line: useLibrary 'org.apache.http.legacy' in build.gradle file, the user will notice that whenever decides to use a get request using an AsyncTask from web the following error occurs:
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask java.lang.RuntimeException: An error occurred while executing doInBackground() Caused by: java.lang.NoSuchMethodError: No virtual method execute(Lorg/apache/http/client/methods/HttpUriRequest;)Lorg/apache/http/client/methods/CloseableHttpResponse; in class Lorg/apache/http/impl/client/DefaultHttpClient; or its super classes (declaration of 'org.apache.http.impl.client.DefaultHttpClient' appears in /system/framework/org.apache.http.legacy.boot.jar)
This happens because one of the imports from this project implementation 'ai.api:sdk:2.0.7@aar' implementation 'ai.api:libai:1.6.12' already contains a httpclient class.