Android Dex Gives a Bufferoverflowexception When Building

Android dex gives a BufferOverflowException when building

No need to downgrade the build tools back to 18.1.11, this issue is fixed with build tools 19.0.1.

If you can't use 19.0.1 for some reason then:

Make sure that the value of android:targetSdkVersion in AndroidManifest.xml matches target=android-<value> in project.properties. If these two values are not the same, building with build tools version 19.0.0 will end in the BufferOverflowException. Source

There is also some indication from comments on this post that you need to target at least 19 (android-19). Please leave a comment if this solution also works if your target is < 19.

This is how the fix looks for my project. The related AOSP issue is #61710.

1 If you really need to downgrade, you don't need to uninstall build tools 19.0.0, simply install 18.1.1 and add sdk.buildtools=18.1.1 to the local.properties file.

BufferOverflowException when building application

try to Add Android Support Library :D https://stackoverflow.com/a/19803777/544265

Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace

from Eclipse:

First Right click on project and go to properties.


  1. Go to Java Build Path Screen (from left menu)

  2. Select Libraries Pane.

  3. Highlight Android dependencies

  4. Click Remove

  5. Click Ok.

Sample Image

Why do I get a BufferOverflowException when running a TensorFlowLite Model?

Does adding .rewind() to your input and output buffer make it work?
If not, I wonder if your input or output tensor is dynamic tensor? In which case the return shape is not usable this way.

BufferOverflowException when trying to encode data

Try to add MediaFormat.KEY_MAX_INPUT_SIZE parameter to your mMediaFormat according to input size. It will increase capacity of inputBuffers.



Related Topics



Leave a reply



Submit