Android : Multiple dex files define Lcom/squareup/javawriter/JavaWriter$Scope; while trying to compile with ButterKnife, Dagger and dagger-compiler

on Sunday, October 12, 2014


I have these in my applications modules build.gradle



compile 'com.jakewharton:butterknife:5.1.2'
compile 'com.squareup.dagger:dagger:1.2.2'
compile 'com.squareup.dagger:dagger-compiler:1.2.2'


When I try to build i get the exception above ( http://i.imgur.com/PMTZwWq.png )


If i don't include the compiler i get:



Module adapter for class ....AndroidModule could not be loaded. Please ensure that code generation was run for this module.


Why am i getting this exception and how should resolve it?


I am using Android Studio.


0 comments:

Post a Comment