Just to make this a bit more visual -

the .classpath shows:
?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="gen"/>
        <classpathentry kind="con"
path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
        <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/myLib"/
>
        <classpathentry kind="output" path="bin"/>
</classpath>

The myLib contains the jars that reside under ROOT/libs in this
particular project.

And finally the .dex archive (and subsequently the .apk file) contains
all the project classes
but not the jars from above.

So what am I missing?? Like I said in the previous email, unless the
Android plugin packaging
ignores the jars I don't see any other reason why they would not be
included.

Thanks


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

Reply via email to