2

I am implementing C2Call library for dial call purpose in one application, and C2Call library has lots of jar files, simple-xml-2.6.7.jar is part of C2Call library. simple-xml-2.6.7.jar is giving me an error in my application at compile time:

[2014-08-21 11:09:56 - Dex Loader] Unable to execute dex: Multiple dex files define Lorg/simpleframework/xml/Attribute;
[2014-08-21 11:09:56 ] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lorg/simpleframework/xml/Attribute;

I've done a lot of surfing to solve this problem, but I can not find solution to resolve this problem.

I hope, you can give solution for this problem.

Thanks.

3 Answers 3

1

This problem happens if you are importing the same library in two different jars. You need to carefully check all the jars and try to find out the jars which are importing the same libraries. If you have the source code then you can easily build the jar again without adding the library.

Another thing to try is to break it into multiple dex files. Please read from here

http://android-developers.blogspot.co.il/2011/07/custom-class-loading-in-dalvik.html

"Big apps can contain more than 64K method references, which is the maximum number of supported in a dex file. To get around this limitation, developers can partition part of the program into multiple secondary dex files, and load them at runtime."

I think you have more than 64k method references and that is causing the problem. Let me know if it works for you

Sign up to request clarification or add additional context in comments.

7 Comments

Thank You Sir. I will do this process as you can suggest me.
Hello sir, I done this process, now another error occur at compile time.
[Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536 Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536
The above errors are occurd at compile time, please help me sir.
Can you mail me the complete log trace?
|
1

It happens when you try to export same jar file twice in single .apk file. Simple way to eliminate this error

Check your:- Android private libraries Referenced Libraries Android Dependencies

and make sure that no jar file is repeated.If any jar file is repeated then find it in libs folder of your project and delete it and then refresh the project.

If this does not solve then try:-

Right Click Project>Properties>Java Build path>Order and Export> uncheck android private Libraries.

7 Comments

Thanks sir, I will do this process.
Hello sir, I done this process, now another error occur at compile time. [Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536 Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536 The above errors are occurd at compile time, please help me sir.
The meaning of this error is your apk file has methods more than 65536.I think you are trying to use methods of higher api level in the low api level.If you are testing it on the device then you must check that device has latest android api level.
Thanks sir,My App Api level is 19., and i testing my app on higher level device.My Device vesrion is 4.2.1 .
Sorry Sir, I tried your solution in my app, but app generate same error
|
0

I added MobFox simple-xml-2.7.1.jar file to Android lib file. When i generated apk i have this error. Delete simple-xml-2.7.1.jar after regenerate apk. I solved my problem by this way.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.