Correction
This happens because you added the library as a compile dependency of your project. Something like that:
dependencies { compile 'com.google.auto.value:auto-value:1.2' }
You need to make the library dependent provided :
dependencies { provided 'com.google.auto.value:auto-value:1.2' }
Note. The provided configuration is available for the Android Gradle plugin. If you use AutoValue in a pure Java library module, use the compileOnly configuration added in Gradle 2.12.
Explanation
AutoValue is a library that generates code for you. Your only interaction with the library itself should be through @AutoValue annotations, which have RetentionPolicy.SOURCE - that is, they are available only in the source code, not in the compiled code.
This means that your compiled code has nothing to do with the code in the AutoValue library. Thus, it does not need to be compiled using your code - it is ProGuard code.
vaughandroid
source share