Several dex files define Lcom / squareup / javawriter / JavaWriter $ Scope; when trying to compile with dagger and dagger compiler
I have this in my build.gradle app modules
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 above exception ( 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 do I resolve it?
I am using Android Studio.
+3
source to share