Wednesday 15 July 2015

android - How can I use both Realm.io and Dagger (or any multiple dependencies that need annotation processing)? -


I'm trying to use both in my and my Android app, but I think that Meta-INF / Services / javax.annotation.processing.processor file

I tried to add the following to my build.gradle file:

  packaging option {pickup 'Meta-INF / Services / JavaX. Annotation. Prositing. Processor '}  

and also tried it with exclusion , but I get errors like this annotation processor to get any project Not being played in.

The error I'm running in is standard class for module adapter can not be loaded.

I think this is happening, because the two annotation processors are not being kept, one or the other package will not be processors, but I can be away from the way.

Your interpretation processor should not be in your compilation dependency scope; Then is provided or, if you use it, then apt .

It does not look like real-M separates its annotation processor as they should, so that one will need to live in its compilation class, but the dagger can move to provide the compiler.

It looks like this:

  compile 'com.squareup. Dagger: Dagger: 1.2.2 'Provided' com.squareup.dagger: Dagger-compiler: 1.2.2 'Compile' io.realm: realm-android: 0.87.1 ' 

The provided (or appropriate) scope makes dependencies available to your compiler, but they are not included in the final product, for which they are not necessary. The dispute you are running in is in the Dex process, but those These sections will never find classes in sections

this will have your last APK An additional benefit of reducing the size too.


No comments:

Post a Comment