Sunday, February 10, 2008

Android Eclipse Plugin / AIDL bugs

UPDATE: This work-around is no longer necessary since m5-rc14 fixed the aidl bugs.

The current Android SDK (m3-rc37a) has numerous bugs surrounding the aidl parser, the most annoying of which makes it very difficult to work with a project utilizing aidl imports and the Eclipse Android plugin. In order to ease some frustrations, I have created a wrapper around the aidl tool which tries to guess certain usage parameters and automatically inject the necessary -I switch.

To use the script, enter your Android SDK tools directory and issue the following:

mv aidl aidl.google

Then save the following script as aidl:

#!/usr/bin/perl

my @aidl = split /[\/\\]/, [ grep { /\.aidl$/ } @ARGV ]->[-1];

foreach (reverse @aidl)
{
last if $_ eq 'src';
undef $_;
}

my $I = join('/', map { $_ if $_ } @aidl);

my @args;

push @args, "-I$I" if $I;
push @args, @ARGV;

system("$0.google", @args);

And finally, set the script executable:

chmod +x aidl

1 comment:

xuemei said...

Now do you worried about that in the game do not had enough wakfu kamas to play the game, now you can not worried, my friend told me a website, in here you can buy a lot wakfu gold and only spend a little money, do not hesitate, it was really, in here we had much wakfu money, we can sure that you will get the wakfu kama, quick to come here to buy wakfu kamas.

Now do you worried about that in the game do not had enough runescape gold to play the game, now you can not worried, my friend told me a website, in here you can buy a lot rs gold and only spend a little money, do not hesitate, it was really, in here we had much runescape money, we can sure that you will get the cheap rs gold, quick to come here to buy runescape.