- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我遇到了 TransactionTooLargeException
。不可重现。在文档中它说
The Binder transaction failed because it was too large.
During a remote procedure call, the arguments and the return value of the call are transferred as Parcel objects stored in the Binder transaction buffer. If the arguments or the return value are too large to fit in the transaction buffer, then the call will fail and TransactionTooLargeException will be thrown.
...
There are two possible outcomes when a remote procedure call throws TransactionTooLargeException. Either the client was unable to send its request to the service (most likely if the arguments were too large to fit in the transaction buffer), or the service was unable to send its response back to the client (most likely if the return value was too large to fit in the transaction buffer).
...
所以我在某处传递或接收超过某个未知限制的参数。在哪里?
堆栈跟踪没有显示任何有用的信息:
java.lang.RuntimeException: Adding window failed
at android.view.ViewRootImpl.setView(ViewRootImpl.java:548)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:406)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:320)
at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:152)
at android.view.Window$LocalWindowManager.addView(Window.java:557)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2897)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4977)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.TransactionTooLargeException
at android.os.BinderProxy.transact(Native Method)
at android.view.IWindowSession$Stub$Proxy.add(IWindowSession.java:569)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:538)
... 16 more
android.os.TransactionTooLargeException
at android.os.BinderProxy.transact(Native Method)
at android.view.IWindowSession$Stub$Proxy.add(IWindowSession.java:569)
at android.view.ViewRootImpl.setView(ViewRootImpl.java:538)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:406)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:320)
at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:152)
at android.view.Window$LocalWindowManager.addView(Window.java:557)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2897)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4977)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
好像和观点有关?这与远程过程调用有何关系?
可能很重要:Android 版本:4.0.3,设备:HTC One X
最佳答案
我遇到了这个问题,我发现当服务和应用程序之间交换大量数据时,(这涉及传输大量缩略图)。实际数据大小约为 500kb,IPC 事务缓冲区大小设置为 1024KB。我不确定为什么它超出了事务缓冲区。
当您通过 Intent Extras 传递大量数据时,也会发生这种情况
当您在应用程序中遇到此异常时,请分析您的代码。
遇到此异常时如何处理
如果可能,将大操作拆分为小块,例如,不要使用 1000 个操作调用 applyBatch(),而是每个调用 100 个。
不要在服务和应用程序之间交换大量数据 (>1MB)
我不知道怎么做,但是,不要查询android,它会返回大量数据:-)
关于android - TransactionTooLargeException 怎么办,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11451393/
Exception thrown launching activities in ProcessRecord{3c67ecf8080:com.example/u0a171} android.os.Tr
异常 05-12 15:42:45.791 11043-11043/ E/UncaughtException: java.lang.RuntimeException: android.os.Tran
val intent = Intent(Intent.ACTION_PICK) intent.type = "image/*" val mimeTypes = arrayOf("image/jpeg"
我正在开发一个 Android 项目,但当我需要从图库中拍照时,我遇到了困难。确实,当我拍摄第一张照片时,一切都很顺利。但是,如果我拍摄第二张照片,则会引发异常“TransactionTooLarge
我不知道在我的一个 Fragment Screens 上导致此异常的原因和位置。 我尝试用这个 TooLargeTool 调试它我有这样的输出: 2-19 18:20:24.317 25554 255
这个问题在这里已经有了答案: What to do on TransactionTooLargeException (43 个回答) 关闭 3 年前。 我正在尝试将 parse.com 与我的 an
这个问题在这里已经有了答案: android.os.TransactionTooLargeException on Nougat (13 个答案) 关闭 4 年前。 我开发了一款应用,该应用在 An
作为我的应用程序的一部分,我通过使用 ApplicationPackageManager.getInstalledApplications 获得了设备上安装的应用程序列表,但对于某些用户,我收到的崩溃
我正在使用正常 Intent 启动 Google map ,并启动覆盖按钮服务以返回我的应用程序。 Intent iconServiceIntent = new Intent(MainActivity
我遇到了 TransactionTooLargeException。不可重现。在文档中它说 The Binder transaction failed because it was too large
尝试共享图像文件时,我不断收到此错误: java.lang.RuntimeException:android.os.TransactionTooLargeException:数据包大小1085992字
我正在使用 usb-serial-for-android 库,我得到了一些奇怪的结果。连续2.5小时与串口通信,读写成功,出现如下异常: exception in UsbManager.openDev
我从我的一个实时应用程序中看到了很多错误报告,原因是这个异常: java.lang.RuntimeException: Adding window failed at android.view.
我的应用程序读取所有已安装 APK 文件的列表,然后循环遍历列表以读取 APK 信息,但它会抛出 TransactionTooLargeException 异常。 根据我在这里阅读的内容 http:/
我将 Nexus 5X 更新为 Android N,现在当我在其上安装应用程序(调试或发布)时,我在每个具有 Bundle in extras 的屏幕转换时都会收到 TransactionTooLar
我在Google Play商店中有一个Android游戏是使用Unity 2018.4.2f1和IL2CPP而不是Mono构建的。 使用的运行时版本.Net 3.5,我以ARMv7和ARM64为目标,
我有一个应用程序,用户可以在其中为他们的用户配置文件上传图像。在我的应用程序中,我允许用户使用 native 裁剪器裁剪图像。但是,当我尝试裁剪大图像时,我的 Logcat 中出现以下错误: !!!
我是第一次实现 ViewPager,我遇到了一些问题,因为我收到以下错误: 06-20 10:40:51.366 11377-11377/com.example.ruelas.elite E/Andr
我正在编写一个 Android 应用程序来跟踪用户的位置并在通知中显示行程的距离、时间和价格,所有这些都在 ForegroundService 中进行跟踪。该服务跟踪位置、价格和时间,我每秒更新一次通
我认为 Intent 的额外大小限制是 1MB,如 docs 上所报告的那样.无论如何,我在追逐这个可怕的 TransactionTooLargeException 时迷失了一天: E/JavaBi
我是一名优秀的程序员,十分优秀!