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.
Go to Java Build Path Screen (from left menu)
Select Libraries Pane.
Highlight Android dependencies
Click Remove
Click Ok.
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
Export a Python Script to an Android Executable (.Apk) with Python-For-Android
How to Autoplay HTML5 Mp4 Video on Android
Do I Need All Three Constructors for an Android Custom View
Hide/Show Bottomnavigationview on Scroll
Sharing Data Between Fragments Using New Architecture Component Viewmodel
How to Maintain Multi Layers of Imageviews and Keep Their Aspect Ratio Based on the Largest One
How to Do Http Authentication in Android
Android - How to Unregister a Receiver Created in the Manifest
How to Set Id of Dynamic Created Layout
How to Downsample Images Correctly
Implement Page Curl on Android
Android - Zoom In/Out Relativelayout with Spread/Pinch
Android Emulator: Could Not Get Wglgetextensionsstringarb Error