Just updated to the newest Android SDK-Tools and our build process broke. We have rather complex multi library dependencies and with the old tool chain we just updated the main project which runs fine with ant.
But now we need to update each of our Android lib with "android update lib-project". When compiling it through Ant or Eclipse we get the well-kown error:
[dx] UNEXPECTED TOP-LEVEL EXCEPTION: [dx] at com.android.dx.dex.file.ClassDefsSection.add(ClassDefsSection.java:123)
I investigated a lot, but it seems that nobody has a real solution on that. I looked at the source and it seems that the exception is unnecessary (line 123) thus I removed it and assembled a new dx.jar file. It seems to work properly now. Also Eclipse now just builds fine.
Because I wasted so much time on this, I want to publish this solution to everybody. Just replace the original dx.jar in your sdk/platform-tools/lib folder.
| Attachment | Size |
|---|---|
| dx.jar | 852.29 KB |
| ClassDefsSection.java | 5.48 KB |