gpt4 book ai didi

android - EGL 错误 : EGL_BAD_ALLOC in my app after Nexus 10 update to Android 4. 4

转载 作者:太空狗 更新时间:2023-10-29 14:17:43 26 4
gpt4 key购买 nike

在 Nexus 10 更新到 Android 4.4 后,我的应用程序中出现 EGL 错误:EGL_BAD_ALLOC。它会导致硬件加速关闭,后来由于以下错误而完全阻止应用程序。

为了导致错误,我使用了包含 Google Maps Android API v2 的 fragment ,然后切换到 Horizo​​ntalVariableListView ( https://github.com/sephiroth74/HorizontalVariableListView )。有时滚动它会导致此错误。

有什么建议吗?当我的应用程序 hes android:targetSdkVersion="18"和 android:targetSdkVersion="19"

时都会发生此错误
11-27 14:02:02.515: W/HardwareRenderer(15033): EGL error: EGL_BAD_ALLOC
11-27 14:02:02.530: W/HardwareRenderer(15033): Mountain View, we've had a problem here. Switching back to software rendering.
(..)
11-27 14:02:02.995: E/gralloc(15033): invalid gralloc handle (at 0x0)
11-27 14:02:02.995: W/GraphicBufferMapper(15033): lock(...) failed -22 (Invalid argument)
11-27 14:02:02.995: W/Surface(15033): failed locking buffer (handle = 0x0)
11-27 14:02:02.995: E/ViewRootImpl(15033): Could not lock surface
11-27 14:02:02.995: E/ViewRootImpl(15033): java.lang.IllegalArgumentException
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.Surface.nativeLockCanvas(Native Method)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.Surface.lockCanvas(Surface.java:243)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2433)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.ViewRootImpl.draw(ViewRootImpl.java:2407)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2251)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1881)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:998)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5582)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.Choreographer.doCallbacks(Choreographer.java:562)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.Choreographer.doFrame(Choreographer.java:532)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.os.Handler.handleCallback(Handler.java:733)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.os.Handler.dispatchMessage(Handler.java:95)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.os.Looper.loop(Looper.java:137)
11-27 14:02:02.995: E/ViewRootImpl(15033): at android.app.ActivityThread.main(ActivityThread.java:4998)
11-27 14:02:02.995: E/ViewRootImpl(15033): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 14:02:02.995: E/ViewRootImpl(15033): at java.lang.reflect.Method.invoke(Method.java:515)
11-27 14:02:02.995: E/ViewRootImpl(15033): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
11-27 14:02:02.995: E/ViewRootImpl(15033): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
11-27 14:02:02.995: E/ViewRootImpl(15033): at dalvik.system.NativeStart.main(Native Method)

最佳答案

这个错误似乎是由于在 map View 中打开了太多文件造成的。此错误后来导致硬件加速错误。现在我从 LruCache 加载缓存图像而不是仅加载文件,错误消失了。

关于android - EGL 错误 : EGL_BAD_ALLOC in my app after Nexus 10 update to Android 4. 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20243430/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com