java - Cannot include "javaee-api-7.0.jar" in Android Application -


When I try to run my android application and I want to "javaee-api-7.0.jar" in my Libs folder I get the following error at the time of compilation: <2014> {code> [First App] DX Trouble Processing "javax / management / j2ee / listenerRegistration .class ": Ill- Do not build core libraries when using advice or misuse of a main category (Java. * Or javax. *) It is usually un In Ane is by including core library file in the project of your application when using the IDE (such as Eclipse). If you are sure that you are not deliberately defining a core class, then it is most likely what is happening. However, you can actually try to define a square in a core namespace, for example, from a non-Android virtual machine project, the source you may have taken it will not be the most trusted. At a minimum, it puts your app's compatibility at risk with future versions of the platform. It is also often of suspicious validity if you really intend to build the main library - which is only appropriate as part of creating a full virtual machine distribution, as opposed to compiling an application - Then use the "cowl-library" option to suppress this error message. If you go ahead and use "cowl-library", but actually building an application, be careful that your application will still fail to make or run at some point. Please be prepared for those angry customers, who are looking for, for example, after updating your operating system your application function is on. You are the culprit for this problem. If you are legally using some code that is in the main package, then you have the easiest option to rename that code. That is, this means to move classes into questions in their own package namespace It is that they will never be in conflict with the core system classes. Jararājar is a tool that can help you in this endeavor. If you find that you can not do this, then it is an indication that the path you are on will eventually become the cause of pain, pain, sorrow and sorrow. [2014-04-22 11:27:53 - First App] DX 1 error; Aborting [2014-04-22 11:27:53 - firstApp] Conversion to DelWeck format failed in error 1

How do I fix this error?

It looks like javax.management * is not available in it. This means that it is now safe to suppress the warning ... but if Android has ever decided to add this class, then it will be a problem.

In my case, however, javaee-api was required but in fact it was not used, so I can just suppress this dependency in the following manner (taken from the syntax ):

  compile ("io.grpc: grpc-all: 0.7.1") {group excluded: "javax"}   

If you really need something from the javaee-api package, then you should change the name of the jarjar for suggestions suggested by the error message. The plugin will prove useful here.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -