“Conversion to Dalvik format failed with error 1” on external JAR

前端 未结 30 2526
抹茶落季
抹茶落季 2020-11-21 07:32

In my Android application in Eclipse I get the following error.

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already add

30条回答
  •  不思量自难忘°
    2020-11-21 07:54

    None of previously proposed solutions worked for me. In my case, the problem happened when I switched from referencing a library source code folder to using the library JAR file. Initially there was an Android library project listed under the Android application project Properties\ Android page\ Library section, and the library compared also in project explorer tree as a link to the library source directory.

    In the first place, I just deleted the directory link from the project tree and I added the JAR library to the build path, but this caused the exception.

    The correct procedure was (after changing back the build path and putting back the reference to the library source):

    • properly remove the library source directory link by actually removing the reference from application project Properties\ Android page

    • adding the library JAR to the application project build path as usual.

提交回复
热议问题