1

When I try to build apk android studio gives me this error.

Can anyone has any idea about this error?

Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: permissions/dispatcher/GrantableRequest.class

Konrad Krakowiak
  • 12,285
  • 11
  • 58
  • 45

1 Answers1

0

If you are using PermissionsDispatcher library thn its mentioned as issue for duplicate class entry.

How to Check attached libraries Dependency/hierarchy ? which causes duplicate entry for libraries.

In your case you need to make changes as per mentioned in libraries known issue.

 compile 'com.github.hotchemi:permissionsdispatcher:2.0.3'
 compile 'com.github.hotchemi:permissionsdispatcher-processor:2.0.3'

Make changes as per below

compile 'com.github.hotchemi:permissionsdispatcher:2.0.3'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.0.3'

For more details on duplicate entry issue please check this

UPDATE Its required to define apt dependecies in root level build.gradle file also

check this for root level build.gradle file declaration.

Let me know if anything

Community
  • 1
  • 1
user1140237
  • 5,015
  • 1
  • 28
  • 56
  • now m getting this error Error:(43, 0) Could not find method apt() for arguments [com.github.hotchemi:permissionsdispatcher-processor:2.0.3] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. – umar farooq Feb 20 '17 at 17:45
  • @umarfarooq you need to define `apt` dependencies in application's top level `builld.gradle` file also . `classpath "com.neenbedankt.gradle.plugins:android-apt:1.8"` – user1140237 Feb 21 '17 at 05:43