Posts Tagged ‘Linux’

IDE Performance Tunning

Posted: March 7, 2011 in Eclipse, Java
Tags: ,

Usually when people refer to IDE performance tunning such s Eclipse they only talk of changing the Eclipse .ini file. If you are lucky to be using Eclipse under Linux there is one more setting that helps. That is change the priority form zero to about negative 5(-5) which tells the Linux OS to give more or higher priority to the Eclipse IDE which in turn results in less time of the IDE being ‘paused’ to about down to zero times it being paused.

I would imagine once you launch the android emulator you can also set its priority to about -5 with the same effects.

First, if you are running android tools 8.0.1 from eclipse than everything works fine. Second, to run build using android tools 8.0.1 or higher outside of eclipse you must use ant 1.8.1 or higher. Most Linux version in theri beta/test repos already have compiled ant 1.8.1 binaries to install to run ant 1.8.1 form the command line.

My AndCooperANT set of build is being kept pre-ADT8, the new ADT8 or higher project is named IndianaANT and will be up in days.

Now for some other good news, it appears that ADT 9.0 may be pushed out December 20th as it fixes some minor bug issues. One of the changes is an ant version check in the custom task.

As far as eclipse, it will not have ant version 1.8.1 until very late in the 3.7 testing cycle and I doubt if eclipse 3.6.2 will include ant 1.8.1. Thus, since ADT 8.0.1 runs fine in eclipse without ant being upgraded in eclipse the best option is update your ant install if you run builds outside of your IDE. If you have not switched your build run outside of IDE to ant 1.8.1 you will notice the side effect of 3rd party libs not being included in the dex and that is due to some behavior changes between ant 1.7.1 and ant 1.8.1.

Enhanced by Zemanta

So I am on the last part of the AndCooperANT journey of adding Android NDK support that set of android application build scripts. So I am using Eclipse 3.5 and Android NDK r4b and need to set up a sample project to test my build scripts.

Here is how I accomplish that so that I have an Eclipse CDT nature within an eclipse Android SDK application project that actually uses the NDK build system and also gets rid of that annoying CDT no gnu makefile at project with all target error…

1. Right click on project root and New Project->Other->C++->Convert to C++

2. check C++ project choose Makefile and choose other toolchain

3. Say yes to open C++ perspective.

4. In C++ perspective create new folders of libs, obj, and jni

5. In C++ perspective under C++ General set output folders under paths to libs and obj and set source folder to jni.

6. In C++ perspective right click project root and select properties than choose builders:

un-check everything on the CDT builder

create a new builder type of program

If using Linux than its

First box ndk-build script location

Second box is project location

Third box is these args: -C ${build_project}

If using Windows the settings for that builder wil be the ones this blog post covers:

Now what you should see is after that go to Eclipse project menu and choose Build Project and you should this in your console:

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /home/fredgrott/my35ws_github/AndCooperANTNDK/jni/
make: Entering directory `/home/fredgrott/my35ws_github/AndCooperANTNDK’
make: Leaving directory `/home/fredgrott/my35ws_github/AndCooperANTNDK’
/home/fredgrott/opt/android/android-ndk-r4b/build/core/ *** Android NDK: Aborting…    .  Stop.

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /home/fredgrott/my35ws_github/AndCooperANTNDK/jni/    make: Entering directory `/home/fredgrott/my35ws_github/AndCooperANTNDK’make: Leaving directory `/home/fredgrott/my35ws_github/AndCooperANTNDK’/home/fredgrott/opt/android/android-ndk-r4b/build/core/ *** Android NDK: Aborting…    .  Stop.

Now click on the problems tab in Eclipse and you should see no pesky CDT no makefile with all target error in that at all in fact you should see an error count of exactly zero.

Enhanced by Zemanta