Turning off auto-build in Eclipse

I can’t quite figure this out… obviously I turned off Project -> Build Automatically for everything.

But for whatever reason, any time I start Eclipse the openFrameworks projects get rebuilt. It takes about ten minutes and displays “Android Library Update” in the bottom right-hand corner. Here is a screenshot, how can I turn this behavior off?

It takes 35 seconds here.

Maybe this can help:

Window -> Preferences -> Android -> Build -> Skip packaging and dexing until export or launch

haven’t tested what @Rancs proposes but as far as i know there’s no way to tell the android plugin to not build every project on start (you can just cancel it) but it shouldn’t be building all of openframeworks except for the first time. what version of OF are you using?

I’m using 0.8.4, I’ll give the skip a shot.

Drat, that option was already selected. Looking closer though, it actually is only my code that is being built and not openFrameworks. However, everything is being compiled four times: once for v5 once for v7 once for NEON and once for x86. I could have sworn I followed the install instructions to the letter… does this multiple compilation ring a bell for anybody in terms of commonplace Eclipse config problems? Or is this the normal state of affairs?

Nick

android applications need to be compiled for all the possible cpus to be able to run them in any device. there’s actually one more platform we’ll need to add soon. so yes that’s normal you need to compile as many times for the final application.

in 0.9 at least, if you compile in debug, the OF makefiles will only compile for arm7 making the compile process much faster.

Ok, thanks for the advice. If I’m ever sentenced to work on Android again I’ll try 0.9 and Android Studio (maybe it doesn’t build on start).

When I look at your screenshot, I realize it invokes a command “make -j4 -C …”

I told you it takes 35 seconds here. I look at my invoked command, it writes “ndk-build …” As we use here ndk builder with oF as a shared library, the process takes a shorter time

How long the build process is in Android Studio?

Oh, I see. I… think I use of as a shared library as well, like I mentioned above it’s just my own code that is built on start. I guess you are using something custom then? I went through the install instructions here to get everything going and I ended up with a command that invokes a makefile:

http://openframeworks.cc/setup/android-eclipse/

I’m not sure how long it takes on Android Studio, I’m just blindly assuming that you would be able to disable the build-on-startup behavior!

@Rancs ndk-build internally uses make to build so i doubt it would be much faster than the OF toolchain. For me compiling the empty example, including ofxAndroid, in debug also takes 35s. even if ndk-build used a faster build system like ninja or qbs it wouldn’t make a big difference since most of the time (by orders of magnitude) is spent in compiling the actual code.

@racarate, i don’t remember right now if 0.8.4 compiled all the platforms in debug but if it did you can set it to only compile arm so it’s faster while you develop by adding:

ABIS_TO_COMPILE_DEBUG = armv7

at the end of the config.make file for your project. it’s super anoying that adt always tries to compile every project at the beginning but in the end if only recompiles whatever has changed and you can always stop it or just let it recompile in the background while you keep working. it’s also adviceable to have as few projects as possible open in the workspace so the times it takes to recompile are shorter

Oh cool, I will give that build setting a shot. Thanks!

Oh I forgot this setting:

Eclipse->Window->Preferences->General->Startup and Shutdown->Refresh workspace on startup

Interesting, that option was off. It must be the “plugins activated on startup” that is causing the auto-build, but I don’t see any options to configure those plugins. I’ve just gotten in the habit of canceling whatever starts when I launch eclipse!

Thanks for the tip!

Oh, by the way like Arturo said it was building for all architectures that was making the build times go through the roof. I changed config.android.default.mk from this:

ABIS_TO_COMPILE_RELEASE armv5 armv7 neon x86

to this:

ABIS_TO_COMPILE_RELEASE armv7

Debug builds were set up to make just one architecture but our project settings were such that we were testing with release builds.