android升级后错误:Unable to execute dex: java.nio.BufferOverflowException.Check

时间:2024-03-25 21:03:20

Android SDK Tools升级为22.3,Android SDK Platform-tools 升级为19后,编译工程出现错误:

Unable to execute dex: java.nio.BufferOverflowException.Check



网上很多解决方法:

1. 将Android SDK Build-tools (19)卸掉,换用Android SDK Build-tools (18.1.1);

2. 右击工程  > “Android Tools”  > "Add Support Library...";



本人亲自在windows下面试过第2种方法可行,但是在Mac OS X 10.8.5下面,方法2不可行,而是使用另外一种方法:

3. Try removing the Android Dependencies from your project, in addition to the above suggestions.

Steps:

(1) Right Click on your project -> Build Path -> Configure Build Path...

(2) Remove Android Dependencies from the Libraries tab.

This worked in my case, but removing the Android Dependencies may introduce errors in your project. So, be sure to review the project dependencies.