lr
unread,Apr 26, 2011, 5:32:25 PM4/26/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-platform
Hi,
I am trying to use the custom built android.jar to build an
application in place of the one that ships with the SDK. I downloaded
the froyo source code and did the following
1) source build/envsetup.sh
2) lunch 1
3) make
4) make update-api
5) make sdk
I copied the file in $froyo_home/out/host/linux-x86/sdk/android-
sdk_eng.kctg86_local_linux-x86/platforms/android-2.2.1/android.jar
I added it in my build path in eclipse and removed the already present
JAR file. I use the downloaded SDK at API level 8 for froyo.
I wrote a simple home application and it does not work with the new
android.jar. I get this error
Dx
trouble processing "javax/security/auth/Subject.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.
However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.
If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.
If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.
[2011-04-26 16:46:44 TestApp1] Dx 1 error; aborting
[2011-04-26 16:46:44 TestApp1] Conversion to Dalvik format failed with
error
This only happens with the android.jar built by downloading the source
code. It goes away if I use the android.jar that ships with the SDK.
Most of the forums told me to do a project clean and rebuild and they
never worked. If anyone has faced this issue and figured it out,
please let me know
Thanks
lav