And one more interesting fact - if I add the jars as External Jars using Eclipse, building the workspace takes a while, eventually it runs out of memory and it only generates the resources file (no apk and no dex). If I add the jars as Lib (as I showed in the previous posting), the workspace is built fast, all archived deployable files are generated but no jars are include ... something seems a bit out of wack here - anyone else saw this before?
Thanks again On Jul 18, 8:19 am, Mark Murphy <mmur...@commonsware.com> wrote: > On Sat, Jul 17, 2010 at 11:45 PM, kypriakos <demet...@ece.neu.edu> wrote: > > But older postings and > > some > > sources supported that in general external jars may not work under > > Android > > There are a multitude of reasons why an existing JAR may not work on Android: > > -- It was compiled with Java 1.4.2 or a non-Sun/Oracle Java compiler > -- It assumes certain classes exist (from, say, JavaSE) that do not > ship with Android > -- It uses JNI (and therefore needs to be adjusted to work with the NDK) > -- It assumes certain platform binary programs exist, or exist at > certain paths, which may not be the case on Android > -- and so on > > > and that their corresponding source should be compiled with its SDK > > before > > they can be used > > That will directly resolve the compiled-with-wrong-compiler program > and will give you better error information for the > assumes-certain-classes-exist problem. > > > In any > > case, > > then it makes no sense as to why the classes are not visible in the > > emulator > > even though I (finally) managed to include the jars in the apk - > > having them in > > the classpath does not do it. > > Step #1: Put the JAR in libs/ > Step #2: If using Eclipse, add it to your build path > Step #3: Code to the JAR's API and build your APK > > and you're done...assuming the JAR is Android-friendly. For example, > here is a sample project using a re-compiled edition of the BeanShell > interpreter: > > http://github.com/commonsguy/cw-android/tree/master/Java/AndShell/ > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 3.1 Available! -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en