[android] Android dex gives a BufferOverflowException when building

java.nio.BufferOverflowException during from dex error This means you don't have the supporting API for that level hence the build fails, there are a number of ways you can fix this.

Check your manifest file uses-sdk android:minSdkVersion="4" and android:targetSdkVersion="14"

Any of the below will fix the problem:-

  • Download the required API level (This might take time) and run your application again
  • Quick dirty fix change your Project target in project.properties to your new target target=android-4
  • Quick clean fix, change the SdkVersion in your manifest and Clean your project to add the changes to your project.properties (My favorite)