I am trying to get my project (formerly working in Eclipse) up and going in the IDEA 11 trial period.
The project structure is thus (for one of several apps in the project) is as follows. This is, I should point out, as it worked in Eclipse and is nearly working under IDEA.
The project is complex, as the apps use code that was underneath the SDK, but I should add that they've been in release for over 2 years.
- GV -- a third party non-Android project. This is only one without Android Facet. Project SDK (1.6)
- FB -- a third party Android Library -- Facebook's, SDK=2.0
- PA -- a third party Android Library, SDK=2.0
- CD -- an Android library dependent on the three above, SDK 2.0
- BT -- an Android library dependent on nothing, SDK 2.2
- CD2 -- Android library dependent on BT and CD, SDK 2.2
- APP -- this very tiny module generates my application. Depends on CD2, SDK 2.2
I get many errors when trying to make classes.dex
Error:UNEXPECTED TOP-LEVEL EXCEPTION:
Error:java.lang.IllegalArgumentException: already added: Lcom/me/CD/CD$26;
Error:at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error:java.lang.IllegalArgumentException: already added: Lcom/me/CD/ClassNameHere;
Error:java.lang.IllegalArgumentException: already added: Lcom/me/CD/CD$21;
Error:java.lang.IllegalArgumentException: already added: Lcom/me/CD/AppList$1;
Error:java.lang.IllegalArgumentException: already added: Lcom/me/CD/R$attr;
Error:java.lang.IllegalArgumentException: already added: Lcom/me/CD/CD$15;
I also get this odd one with a preachy postamble. Might this have to do with module "GV"? Should GV's SDK be an Android one or Java 1.6?
Error:trouble processing "java/awt/font/NumericShaper.class":
Error:Ill-advised or mistaken usage of a core class (java.* or javax.*)
Error:when not building a core library.
Error:This is often due to inadvertently including a core library file
Error:in your application's project, when using an IDE (such as
Error:Eclipse). If you are sure you're not intentionally defining a
Error:core class, then this is the most likely explanation of what's
Error:However, you might actually be trying to define a class in a core
Error:namespace, the source of which you may have taken, for example,
Error:from a non-Android virtual machine project. This will most
Error:assuredly not work. At a minimum, it jeopardizes the
Error:compatibility of your app with future versions of the platform.
Error:It is also often of questionable legality.
Error:If you really intend to build a core library -- which is only
Error:appropriate as part of creating a full virtual machine
Error:distribution, as opposed to compiling an application -- then use
Error:the "--core-library" option to suppress this error message.
Error:If you go ahead and use "--core-library" but are in fact
Error:building an application, then be forewarned that your application
Error:will still fail to build or run, at some point. Please be
Error:prepared for angry customers who find, for example, that your
Error:application ceases to function once they upgrade their operating
Error:system. You will be to blame for this problem.
Error:If you are legitimately using some code that happens to be in a
Error:core package, then the easiest safe alternative you have is to
Error:repackage that code. That is, move the classes in question into
Error:your own package namespace. This means that they will never be in
Error:conflict with core system classes. JarJar is a tool that may help
Error:you in this endeavor. If you find that you cannot do this, then
Error:that is an indication that the path you are on will ultimately
Error:lead to pain, suffering, grief, and lamentation.
Lastly, some errors finding AIDL code within module CD, seemingly because different modules have their own resources to provide in the end:
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/me/CD/R$drawable.class won't be added. Class R$drawable already exists in classpath
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/FB/android/R$string.class won't be added. Class R$string already exists in classpath
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/FB/android/R$layout.class won't be added. Class R$layout already exists in classpath
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/FB/android/R$attr.class won't be added. Class R$attr already exists in classpath
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/FB/android/R$menu.class won't be added. Class R$menu already exists in classpath
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/FB/android/R$raw.class won't be added. Class R$raw already exists in classpath
Warning:warning: /Users/tone/Documents/code/workspace/CD/bin/classes/com/FB/android/R.class won't be added. Class R already exists in classpath
Is the issue apt to be one of which module should depend on which others, and whether they should do so via "compile" vs "provided" or similar? Those options mystify me, frankly.
Thanks in advance for any advice.