2

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.

mob_web_dev
  • 2,342
  • 1
  • 20
  • 42

2 Answers2

2

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

mob_web_dev
  • 2,342
  • 1
  • 20
  • 42
1

Try marking your volley dependency as compileOnly

compileOnly 'com.android.volley:volley:1.1.0'