问题
I am adding second gradle build for Eclipse Android projects.
However I have to fix a lot of smaller issue as Gradle finds additional errors, that Eclipse build does not, like duplicate values:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':FunshionAndroid:mergeDebugResources'.
> D:\Workspaces\Proj\AndroidApp\res\values-hdpi\dimens.xml: Error: Found item Dimension/tvname_textsize more than one time
As my first goal is to finish Gradle build first, how to configure gradle not to validate projects (stricter than Eclipse does)
回答1:
OK, finally there is Lint configuration. So the reason of errors was that Lint is enabled by default for release build (and gradle makes debug and release 2 builds by default)
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
or use gradle assembleDebug
debug build only.
来源:https://stackoverflow.com/questions/23946772/gradle-build-is-stricter-that-eclipse-adt-e-g-found-item-more-than-one-time