I\'m trying to connect to https server on android using Retrofit. Here\'s my OkHttpClient
@Provides
public OkHttpClient provideContactClient(){
According to Network security configuration
The guidance in this section applies only to apps that target Android 8.1 (API level 27) or lower. Starting with Android 9 (API level 28), cleartext support is disabled by default.
Create file res/xml/network_security_config.xml
Your URL(ex: 127.0.0.1)
AndroidManifest.xml
...
OR you can directly set in application in manifest like this.
...