Posts Tagged ‘Eclipse’

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

The New ADT

Posted: November 22, 2010 in Android, Eclipse, Java
Tags: ,

Ah I think Google plans a nice x-mas present for android application developers in the form a new and improved ADT plugin. Visual Editor now has drag and drop! Proguard fully included. Heirarchy viewer no longer regulated to command-line as you will view it using the new ADT plugin. And also clicking on lines in logcat takes you directly to code.

Dario Laverde has more coverage at his first blog post.

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:

http://www.rbgrn.net/content/348-get-your-eclipse-integrated-ndk-on

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/Android.mk
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/add-application.mk:98: *** Android NDK: Aborting…    .  Stop.

Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /home/fredgrott/my35ws_github/AndCooperANTNDK/jni/Android.mk    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/add-application.mk:98: *** 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

Okay, time for some more eclipse tricks. Create new project, do not click finish yet!  Uncheck the default location and browser and select the parent project folder and in the address bar of project location type /test and you will see:

Correction: Name Project ParentProjectNameTest, ADT plugin will show an extra project at workspace root(you can ignore that as its not an actual project ..ie its not in file explorer on your SystemOS etc.)

If you use build scripts than the tested.project.dir property will change with the test build script in the test directory as it will be a relative location to the parent project. If you use a different IDE, I am assuming you can do the same trick with the IDE Android plugin you have.

Well, if you are using a DVCS like Git you are already using the do not default location to get all your DVCS stuff in one sub-folder for all projects anyway and thus its just an extension of that technique.

Enhanced by Zemanta

WARNING this is not for the faint-of-heart! It will break upon SDK revisions! Because it might result in more work for  GoogleOHA Engineers they might discourage it! WARNING, THIS ONLY WORKS WITH ECLIPSE! If you look at the SetUP Ant task code you will find that it checks for an sdk.ant.build.revision number with a max value of 3 set at this time. The value is stored in the sdk.properties file at the root of the platform version folder.

Now, here is the trick. Change the number to the max which is 3. DO NOT STOP YET AS YOU ARE NOT DONE. Copy the complete set of ant_rules_r2.xml, ant_libs_rules_r2.xml, etc and change the copy names to use r3.  Add the new obfuscate target making sure to add the other stuff such as Proguard config checking, etc. Now change that dex target by setting depends to include the obfuscate target you added after the compile target in that depends line.

Now, fire up Eclipse and compile all you want knowing that its being obfuscated automatically. Neat huh? FINAL WARNING, I HAVE NOT TESTED THIS WITH ANDROID LIBRARY PROJECTS YET!

I found it as I was looking at ways to decrease the ANT build script code I was writing and I really did not want to re-invent what Google/OHA were already doing with anttasks and android development tools. Its not the tools folks, despite what Joe Hewitt claims. Its the knowledge of hacking up the tools to do what you want!

Enhanced by Zemanta

Good morning and welcome to the beginning of the Android ‘Land-grab’. Some useful tools:

1. OpenNCF has published their sdk for andorid and an android add on at:

http://sourceforge.net/projects/open-nfc/files/

2. The AppInventor site went live:

http://appinventor.googlelabs.com/about/

Its a visual programming tool to develop android applications.

3. OpenFrameworks has released an android version for NDK development:

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

4. Mark Murphy has released an Android Jar library tool called AndParcel that makes it easier for Androdi Jar Library deployment for those who do not use the Eclipse IDE and Gogle ADT combination at:

http://andparcel.com/

Enhanced by Zemanta

Classes Source for Eclipse

Posted: June 30, 2010 in Android, Eclipse
Tags: ,

Okay folks, I have uploaded to dropbox classes source for 1.5, 1r3.6r2, 2.0.1r1, 2.1r1, and 2.2r1:

1.5

1.6

2.0.1

2.1

2.2

Unjar or unzip them into the sdk/platform/sources folder that you create and Eclipse than will recognize them.

Froyo src.jar for Eclipse

Posted: June 28, 2010 in Android, Eclipse
Tags: , ,

The source to classes zip has been uploaded by a helpful soul and posted to the Issue 979. Please do not abuse his ISP, mirror it somewhere, the link is at the bottom. You put a sources folder in platform-8 folder and than Eclipse can see it, you might have to restart Eclipse if eclipse is open.

Checkstyle Settings

Posted: April 23, 2010 in Android
Tags: , , ,

In the Android Programming Tools Knol collection, Checkstyle for Android with the checkstyle files to  use and Eclipse Checkstyle Settings for Android.