sendgrid / java-http-client

SendGrid's Java HTTP Client for calling APIs
https://sendgrid.com
MIT License
25 stars 78 forks source link

Error when sending an email through SendGrid API on android 6 project #114

Closed baudoliver7 closed 5 years ago

baudoliver7 commented 5 years ago

Issue Summary

SendGrid doesn't work on android Level 23+ because HttpClient of Apache which one java-http-client has based on, has been removed from Android 6.

Steps to Reproduce

  1. Have an android 6 project
  2. Import sendgrid-java:4.3.0
  3. Try to send an email through Sendgrid API
  4. You get an error in SendGrid constructor

Details of error : 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!classes3.dex)

Technical details:

thinkingserious commented 5 years ago

Hello @AigleRoyal7,

I believe this is a duplicate of https://github.com/sendgrid/java-http-client/issues/2. Please follow along there for progress. Thanks!

With Best Regards,

Elmer