tags:

views:

32

answers:

1

I work with Eclipse and implement some applications using the Android Emulator.

I'd like to know:

  1. is it possible to extend Android APIs with other .jar file?
  2. If it's possible, how can I extend the APIs? I just have to add libraries to the project or do I copy it to the $ANDROID_HOME/platforms/android-8/tools/lib
+1  A: 

If you want to use thirdparty jars you just need to include them in your Android application. You can do that putting them in a lib directory under your android project or adding them to your build path. You do not need to add anything to the SDK.

BrennaSoft
If you don't put them in the lib folder of your android project the jar will no t be copied to the phone therefor the application will fail during execution.
Janusz
Thanks for your reply! I do that, I add external jar in my build path, infact I haven't error in my progect, but when I run my application, in the LogCat I obtain:tag: dalvikvm Message: Could not find class 'org.apache.axis.client.Service', referenced from ...
Deborah
@Janusz That's not true. http://developer.android.com/guide/appendix/faq/commontasks.html#addexternallibraryI have 10+ apps in the market that include 3rd party jars by the "Add External Jar" method.@Deborah Make sure you also have the jar that contains org.apache.axis.client.Service, it may be indirectly referenced by something in your app, which is why it will compile(missing the jar) but fails at runtime.
BrennaSoft
Hi, I think I understand what is the problem!! I try to include java.rmi* but DalvikVM Serialiation!=JavaVM Serialization! @BrennaSoft: I'm sure I have the jar that contains org.apache.axis.client.Service.Now I read an other error:[EchoClientWS] warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)[Dex Loader] Unable to execute dex: null[EchoClientWS] Conversion to Dalvik format failed: Unable to execute dex: null.
Deborah