[android-developers] Don't mix Eclipse and Ant
Sorry for this rant, but I have a number of complaints with the Android build system I'd like to air. Firstly thank you Android build system engineers for adding incremental building to the build system, this is a hard problem and your work here is appreciated. Now on to the major issue I just spent the evening debugging: When you combine eclipse with the command line Ant build you may get runtime errors in your APK! If you are using eclipse and it can't build one of your library projects because the java source has compilation errors Eclipse will go ahead and make class files anyway! The methods in these class files will be filled with junk like: throw new Error("Unresolved compilation problem: \n"); If you then go ahead and build the same project with Ant in the commandline, the new incremental checks in the Android Ant build script will see that it is already been compiled, skip that step and use these class files in the generated APK. Resulting in runtime errors. Jacob Abrams -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Don't mix Eclipse and Ant
On Fri, May 11, 2012 at 5:58 PM, Jacob Abrams wrote: > > If you are using eclipse and it can't build one of your library projects > because the java source has compilation errors Eclipse will go ahead and > make class files anyway! The methods in these class files will be filled > with junk like: > > throw new Error("Unresolved compilation problem: \n"); > > If you then go ahead and build the same project with Ant in the commandline, > the new incremental checks in the Android Ant build script will see that it > is already been compiled, skip that step and use these class files in the > generated APK. Resulting in runtime errors. > Sounds nasty, but did you file a bug? You should, if you haven't. >From what I've seen, the Ant build system doesn't seem to get much testing, sometimes it's downright broken between releases. Haven't tried it lately though, so things might have changed. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Don't mix Eclipse and Ant
Jacob, Don't use tools that modify the project pulling rugs from underneath Eclipse's feet. As an IDE it has specific stages to package and build each project and it needs to hook into those, so that it understands, what has happened and what is to happen. You can either use a tool chain that is Eclipse free (disjoint source editor + ant to build) or make use of Eclipse's ability to build using Ant: http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-93_project_builder.htm http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2FgettingStarted%2Fqs-80_ant.htm Daniel On 11 May 2012 09:58, Jacob Abrams wrote: > Sorry for this rant, but I have a number of complaints with the Android > build system I'd like to air. > > Firstly thank you Android build system engineers for adding incremental > building to the build system, this is a hard problem and your work here is > appreciated. > > Now on to the major issue I just spent the evening debugging: > > When you combine eclipse with the command line Ant build you may get runtime > errors in your APK! > > If you are using eclipse and it can't build one of your library projects > because the java source has compilation errors Eclipse will go ahead and > make class files anyway! The methods in these class files will be filled > with junk like: > > throw new Error("Unresolved compilation problem: \n"); > > If you then go ahead and build the same project with Ant in the commandline, > the new incremental checks in the Android Ant build script will see that it > is already been compiled, skip that step and use these class files in the > generated APK. Resulting in runtime errors. > > Jacob Abrams > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en