Application error while trying to establish a VPN connection?

According to the document, it is VpnService.prepare(context)used to establish a VPN connection in android, and it does the trick in almost all device models except for special ones (Oppo X9076 Android 5.0) . According to the logs from the crashlytics call on the VpnService.prepare(context)cause of the failure of the SDK internally. Not sure if this is a specific device problem or what !. below is a magazine from krashtitiki.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.android.server.connectivity.Vpn.prepare(java.lang.String, java.lang.String)' on a null object reference
at android.os.Parcel.readException(Parcel.java:1552)
at android.os.Parcel.readException(Parcel.java:1499)
at android.net.IConnectivityManager$Stub$Proxy.prepareVpn(IConnectivityManager.java:1663)
at android.net.VpnService.prepare(VpnService.java:159)

I gave everything, and did not release an extensive search on the Internet, but to make a way out. Pl. help me, I'm stuck here all the way.

Fyr

+6
source share

All Articles