Error when sending an email through SendGrid API on android 6 project
Closed this issue · 1 comments
baudoliver7 commented
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
- Have an android 6 project
- Import sendgrid-java:4.3.0
- Try to send an email through Sendgrid API
- 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
thinkingserious commented
Hello @AigleRoyal7,
I believe this is a duplicate of #2. Please follow along there for progress. Thanks!
With Best Regards,
Elmer