auto: Auto-Factory beta4 fails with DuplicateFileException
When I have a very minimal setup with a factory like:
public class MainActivity extends AppCompatActivity {
@Inject MainActivity_DependencyFactory dependencyFactory;
@Component(modules = MyModule.class)
public interface MyComponent {}
@AutoFactory public static class Dependency {
public Dependency(@Provided String string) {}
}
@Module public abstract class MyModule {
@Provides String provideString() {
return "something";
}
}
}
With only the necessary dependencies
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
provided "javax.annotation:jsr250-api:1.0"
compile 'com.google.dagger:dagger:2.10'
annotationProcessor 'com.google.dagger:dagger-compiler:2.10'
compile "com.google.auto.factory:auto-factory:1.0-beta4"
compile 'com.android.support:multidex:1.0.1'
}
It works fine with beta3. However with beta4 I get a lot errors. I already cleared the cache.
Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK plugin.xml
File1: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.core/org.eclipse.core.contenttype/3.4.100/7052e115041d04410a4519a61307502fb7c138e6/org.eclipse.core.contenttype-3.4.100.jar
File2: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.equinox/org.eclipse.equinox.app/1.3.100/e7169b33d352f5ddb6eace73f5a4d29aae3b91ec/org.eclipse.equinox.app-1.3.100.jar
File3: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.core/org.eclipse.core.filesystem/1.3.100/37fce4f5488a21ce36021d4909acaf5687e1595e/org.eclipse.core.filesystem-1.3.100.jar
File4: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.equinox/org.eclipse.equinox.registry/3.5.101/eac5aeb82732847bc7f11e2b5c934004c4c7a543/org.eclipse.equinox.registry-3.5.101.jar
File5: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.equinox/org.eclipse.equinox.preferences/3.4.1/6770649a91266a4a17747b201723a1fea8c8a198/org.eclipse.equinox.preferences-3.4.1.jar
File6: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.core/org.eclipse.core.expressions/3.4.300/42b2139abd5638730db317a51949dac3b8d81492/org.eclipse.core.expressions-3.4.300.jar
File7: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.jdt/org.eclipse.jdt.core/3.10.0/647e19b28c106a63a14401c0f5956289792adf2f/org.eclipse.jdt.core-3.10.0.jar
File8: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.core/org.eclipse.core.resources/3.7.100/6c56ea28b84afe7d55de02763846e76dbfb0b689/org.eclipse.core.resources-3.7.100.jar
File9: /home/ph1b/.gradle/caches/modules-2/files-2.1/org.eclipse.core/org.eclipse.core.runtime/3.7.0/6658c235056134f7e86295e751129508802d71f2/org.eclipse.core.runtime-3.7.0.jar
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 15 (7 by maintainers)
works for me, +1 to mentioning this in the readme.
Thanks, it would be great if that was mentioned in the readme. It just speaks about adding a jar.
In java it seems to work but when I’m using kotlin it fails:
It just fails to build with
This is how I setup my dependencies:
take a look at: https://kotlinlang.org/docs/reference/kapt.html#non-existent-type-correction
adding that:
fixed problem also remember to exclude guava if you don use. Anyway it would be great if you provide annotations only package
Auto factory shouldn’t be a compile dep
On Sun, Apr 16, 2017, 1:06 AM Paul Woitaschek notifications@github.com wrote: