Conversion to Dalvik format failed with error 1

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lcz/okhelp/MyMathClass;

First try this solution!!!!!
Select your project in project tree and go to the Eclipse menu Project » Clean » Clean projects selected below » select your project and click OK.

If you create *.apk package with proguard sometimes you must back up the project, delete project, and create new project if you are unable to create *.apk file.

Check your AndroidManifest.xml if all Activity is correctly inserted. If you add a library project to Main project you have to insert Activity from library to Main project AndroidManifest.xml

Problem with the library.
I deleted library project from project tree and again put the _library project into the main project. This problem was resolved.
1.)Go to Project » Properties » Java Build Path » Libraries and remove (your projects) click OK.
2.)Go to Project » Clean » Clean projects selected below » select your project and click OK.
3.)Add again your LIBRARY project to your MAIN project Project » Properties » Java Build Path » Libraries.
See image below.

Problem with a *.apk file
If you create signed *.apk, you have to delete previous *.apk from your PC folder.

jar-library-create-with-eclipse

This entry was posted in Bugs, warnings, errors and tagged . Bookmark the permalink.


Comments are closed.



4,868 views