简体   繁体   中英

Gradle build is stricter that Eclipse ADT (e.g. Found item _ more than one time)

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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM