I encountered a resource merging issue when running a gradle build command.
Logs as below:
Error:Execution failed for task ':frameworks:base:core:res:res-common:packageReleaseResources'.> Unsupported type 'add-resource' in file .../kk4_4/frameworks/base/core/res/res-common/res/values-XXX/dimens.xml
Environment:
Resource:
<add-resource type="dimen" name="slidingmenu_menu_width"/>
<dimen name="slidingmenu_menu_width">232dip</dimen>
<add-resource type="dimen" name="card_list_item_padding_left" />
<dimen name="card_list_item_padding_left">13.5dip</dimen>
These <add-resource /> nodes are used for overlays in aapt, and I wonder if there's a way to pass gradle builds without removing them?
I've solved this problem myself, here is the result: add-resource node is not supported when using android plugin 0.8.+ or later If we change
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
to
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
and use gradle 1.8 instead of the later versions
run gradle tasks in terminal, and all tasks turn to success
but the 'Gradle Sync' function will not work properly in the latest Android Studio,
Hope google deals with it soon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With