sendgrid/java-http-client

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

Closed this issue · 1 comments

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:

  • java-http-client Version: master (latest commit: 4.2.0)
  • Java Version: 1.8

Hello @AigleRoyal7,

I believe this is a duplicate of #2. Please follow along there for progress. Thanks!

With Best Regards,

Elmer