1

First I tried to update glide to 4.6.0 but it had some errors then I decided to downgrade it to 4.4.0 but now it's even not building the app. I tried to search a lot of questions both in SO and in github but I couldn't find any . Please help to fix my error.

Error:

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. 

java.io.IOException: Can't write [C:\Users\Srinu\Infinity\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Srinu.gradle\caches\modules-2\files-2.1\com.github.bumptech.glide\glide\4.4.0\7d55ca453af56b7f7e6b494c1781755d89047d4f\glide-4.4.0.jar(;;;;;;**.class)] (Duplicate zip entry [glide-4.4.0.jar:com/bumptech/glide/util/Synthetic.class]))

Gradle Dependencies:

 compile('com.github.bumptech.glide:glide:4.4.0@aar') { transitive = true;//I saw this in a question but even it couldn't solve the issue } annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0' compile 'com.github.bumptech.glide:annotations:4.4.0' 
7
  • Try Build>Clean project Commented Feb 2, 2018 at 9:19
  • I've cleaned it at least for 5 times till now but error is not gone Commented Feb 2, 2018 at 9:23
  • Have you got any jars in /libs folder? Commented Feb 2, 2018 at 9:45
  • @shmakova yes I had one now I've deleted it Commented Feb 2, 2018 at 9:48
  • 1
    Try to remove compile 'com.github.bumptech.glide:annotations:4.4.0' Commented Feb 2, 2018 at 10:32

2 Answers 2

2

Finally after a lot of try I tried a different approach and it solved my issue. I just removed '@aar'from dependency and compile 'com.github.bumptech.glide:annotations:4.4.0' my glide is working fine .But I wonder where the error was I seriously couldn't figure out the real issue.

So now the final gradle is :

compile('com.github.bumptech.glide:glide:4.4.0') { transitive = true; } annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0' 
Sign up to request clarification or add additional context in comments.

Comments

0

Since glide is a big library, while adding glide the number of methods increases above 64k (1 Dex). Hence you need to add Multidex support in your gradle. Have a look at his for how to do.

Enable Multidex for Apps with Over 64K Methods

3 Comments

Thank for your attention but I've tried it already but it couldn't solve my error
have you removed all jar files ?
yes I did but that wasn't helpful but please do check my own answer to the question

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.