'How to solve java.lang.NullPointerException: wrapped.contentEncoding must not be null?

The issue is I try to call endpoint through mobile apps which are android apps that I developed from android studio. at backend site is no exception appear. but then at logcat android showing up the error below:

E/Volley: [354] NetworkDispatcher.run: Unhandled exception java.lang.NullPointerException: wrapped.contentEncoding must not be null
java.lang.NullPointerException: wrapped.contentEncoding must not be null
    at com.android.tools.appinspection.network.httpurl.TrackedHttpURLConnection.getContentEncoding(TrackedHttpURLConnection.kt:177)
    at com.android.tools.appinspection.network.httpurl.HttpURLConnectionWrapper.getContentEncoding(HttpURLConnectionWrapper.kt:127)
    at com.android.volley.toolbox.HurlStack.entityFromConnection(HurlStack.java:160)
    at com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:120)
    at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:97)
    at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:114)

how to solve this issue? really appreciate your guys help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source