Skip to content Skip to sidebar Skip to footer

No Static Field Instance Of Type Lorg/apache/http/conn/ssl/allowallhostnameverifier When Using Htmlunit In Android Studio Project

I am using htmlunit 2.36.0 in my Android Studio Project. I successfully compiled the apk but I am getting some runtime errors when I try to get a webpage. Before, I was getting the

Solution 1:

As hc.apache.org documented:

AllowAllHostnameVerifier Deprecated. (4.4) Use NoopHostnameVerifier

If you downgrade dependencies's version to 4.3(2013~2015) exception will be resolved.

implementation 'net.sourceforge.htmlunit:htmlunit:2.15'

Post a Comment for "No Static Field Instance Of Type Lorg/apache/http/conn/ssl/allowallhostnameverifier When Using Htmlunit In Android Studio Project"