This is a recent issue with the new Android SDK.
Now the Android SDK uses the ANT agreement when importing external cans into the apk package, external banks must be in the "lib" folder, and the SDK will ever export banks from this folder.
My problem is when I add my banks and run my project, I get this message:
error handling "javax / transaction / HeuristicCommitException.class":
Explicit or erroneous use of the main class (java. * Or javax. *) When not creating the main library.
This often happens due to the unintentional inclusion of a core library file in your application project when using an IDE (such as Eclipse). If you are sure that you are not intentionally defining the main class, then this is the most likely explanation for what is happening.
However, you can try to define a class in the kernel namespace, the source of which you may have taken, for example, from non-Android. It will certainly not be a job. At a minimum, this compromises the compatibility of your application with future versions of the platform. It is also often in doubt Legality.
If you are really going to create a core library that is only relevant as part of creating a full distribution of the virtual machine, as opposed to compiling the application, then use the --core-library to suppress this error message.
If you continue to use "--core-library", but in fact applications, you should be warned that your application will still build or run, at some point. Please be prepared for angry customers who, for example, find that your application stops functioning once they update their operating system. You will be to blame for this problem.
If you are legally using some kind of code that is in the kernel package, then the easiest safe alternative you have is to repackage this code. That is, move the classes in question into your own namespace package. This means that they will never be in conflict with the core of the system classes. JarJar is a tool that can help you in this endeavor. If you find that you cannot do this, this indicates that the path you are on will ultimately lead to pain, suffering, sadness, and crying.
I read about this post here and other forums, some people say that the problem with Android.jar is a problem, so the removal will be fixed.
But I can not find this Android.jar, except for the Android lib, which cannot be removed.
This problem about importing android libraries makes me crazy because my application works very well.