views:

79

answers:

2

Hello,

I've followed the steps given in the Android Developer Blog to generate a build.xml for building releases for an Android Application. I need to do a custom compiling so I have overwritten the target compile of the ant_rules_r3.xml as it is said in the generated build.xml.

 <target name="compile" depends="-resource-src, -aidl, -pre-compile" ...

The script works fine and generates the apk, but the problem is that Eclipse shows an error because it cannot find targets -resource-src, -aidl and -pre-compile (which are loaded when executing the script but are not really present on the build.xml). As there are these errors I cannot work with the project in Eclipse.

How can I skip the validation of this single file in Eclipse?

Thanks

+1  A: 

I do not know if you can do this for a single file but i think you can disable the validation within the eclipse preferences under Validation.

kukudas
It doesn't solve the problem. I've suspended all the validators under the Validation section and cleaned the project but the errors are still there. Maybe this errors are not coming from a validator. Eclipse calls this error "Ant BuildFile Problem".
Javi
How about this: under preferences ant -> editor in the tab Problems "Ignore all buildfile problems" ? You can set there a specific file too if i'm not mistaken.
kukudas
@kukudas thanks that worked
Javi
A: 

Kukudas's solution to "Ignore all buildfile problems" does solve the root problem.

However, Eclipse will still detect the buidl.xml as broken and will not allow Ant Builders to call the file. In fact, Eclipse will silently ignore such build steps in your project as if weren't there.

Anm in LA
This ant script is just to build the project outside eclipse. I want that eclipse ignores it, it's just an alternative to Eclipse apk generation.
Javi
It's a problem on my project, where I'm using an Ant task (in both build systems) to populate some constants and resources during some pre-compile targets.
Anm in LA