Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

The type R/BuildConfig is already defined #16

Closed
schildbach opened this issue Apr 26, 2019 · 4 comments
Closed

The type R/BuildConfig is already defined #16

schildbach opened this issue Apr 26, 2019 · 4 comments

Comments

@schildbach
Copy link

After running gradle eclipse and applying the workarounds from #14 and #15, I've got two remaining build errors:

The type BuildConfig is already defined.
The type R is already defined.

This is because andmore (0.5.1) creates these files into the gen folder, and this cannot be disabled afaik. And gradle-android-eclipse generates another set into build/generated/source/r/debug and build/generated/source/buildConfig/debug respectively.

I suggest gradle-android-eclipse should not create the own project's R.java and BuildConfig.java files, since andmore already takes care of this.

@schildbach
Copy link
Author

Workaround: I can delete the two files manually (e.g. from within Eclipse) and the problem is gone.

@greensopinion
Copy link
Owner

gradle-android-eclipse isn't generating any java files directly, that must be coming from somewhere else (e.g. https://docs.gradle.org/current/userguide/eclipse_plugin.html, which this plug-in extends.) I recommend driving changes into that project instead.

@schildbach
Copy link
Author

Then the documentation is wrong. According to https://github.com/greensopinion/gradle-android-eclipse#what-it-does the files are generated in fact by gradle-android-eclipse.

@schildbach
Copy link
Author

And actually I don't know why Android-ony artifacts should be created by the generic Eclipse plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants