BufferOverflowException when building application
try to Add Android Support Library :D https://stackoverflow.com/a/19803777/544265
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.
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.
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.
what is the purpose of BufferOverflowException
Buffer Overflow means that too much data is given to an application.
Example: Copy the text of a book into 'New Contact Name' on a phone.
Typically, if not handled well, this leads to a chrash...
More importantly, it can be a security flaw!
The extra data can get stored outside of the programs designated memory, and the extra data could be executable code.
So, it's good practice to always validate user input! :)
Related Topics
How to Switch Automatically Between Viewpager Pages
Android - Detecting Application Launch from Home or History
Multiple Dex Files Define Lcom/Google/Android/Gms/Internal/Zzau
Pass Arraylist Data into Soap Web Service in Android
Swap Fragment in an Activity via Animation
Android Sharedpreferences in Fragment
How to Display Both Icon and Title of Action Inside Actionbar
In Fragment on Back Button Pressed Activity Is Blank
Android Webview: Download Files Like Browsers Do
How to Setup Appium in Ubuntu for Android
Android 2.1 View's Getdrawingcache() Method Always Returns Null
Android Home Screen Widget (Icon, Label - Style)
How Can One Pull the (Private) Data of One's Own Android App