How can solve Duplicate jar entry [com/android/volley/R.class] in Release build?

Debugger :

I am getting an error when generate apk in release mode. The error is Duplicate jar entry [com/android/volley/R.class]. I knew that the issue is caused because I am using an external jar file which contains Volley & I am using Volley in my project. I would like to know how I can exclude the dependency from the external jar files.

It happen when the condition

minifiedEnabled is true

I saw similar questions but none of them helped me.

Debugger :

The excluse functions are not worked. SO then we fixed the issue by replace the JAR library with AAR

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=148218&siteId=1
Recommended