I'm experimenting with my first "Hello World"-like application in Android Studio. I've tried to add a new activity (first via New -> Android Component, didn't like the result, deleted it, then via New -> Activity -> selected Fullscreen activity). Now I get these errors:
Gradle: Execution failed for task ':LanguagesMemorizer:processDebugResources'.
> Could not call IncrementalTask.taskAction() on task ':LanguagesMemorizer:processDebugResources'
C:\...\src\main\res\values\attrs.xml
Gradle: Attribute "buttonBarStyle" has already been defined
Gradle: Attribute "buttonBarButtonStyle" has already been defined
I've tried searching for buttonBarStyle in my project. It was found in:
- build folder (I guess I should ignore that, shouldn't I?)
- layout file for a new activity (style="?buttonBarStyle")
- values\attrs.xml itself (
<declare-styleable ...> <attr name="buttonBarStyle" format="reference" /> ...
) - values\styles.xml (
<style...>... <item name="buttonBarStyle">@style/ButtonBar</item>...
) - values-v11\styles.xml (
<style...>...<item name="buttonBarStyle">?android:attr/buttonBarStyle</item>...
)
All of it was auto-generated. How should I fix this error?
UPDATE: There is a comment in attrs.xml which says
<!-- Declare custom theme attributes that allow changing which styles are
used for button bars depending on the API level.
?android:attr/buttonBarStyle is new as of API 11 so this is
necessary to support previous API levels. -->
So it seems like these attributes are needed for old Androids, but so I guess there is some sort of a conflict between API 11-declared attributes and these manual attributes. How should I fix them?