我正在运行 AsyncTask
java.lang.OutOfMemoryError: Could not allocate JNI Env
at java.lang.Thread.nativeCreate(Native Method)
at java.lang.Thread.start(Thread.java:1063)
at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:921)
at java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:989)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1131)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
我下次运行应用程序并执行相同任务时遇到此错误,第一次任务完成时没有任何问题,也没有崩溃,当我返回按下并退出应用程序并返回并执行它显示的相同任务时这个错误
[ 11-06 22:20:02.741 1174: 1219 D/ ]
NULL ==
surf->write_back_color_buffer
11-06 22:20:02.741 1174-1219/com.package A/OpenGLRenderer: Encountered EGL error 12291 EGL_BAD_ALLOC during rendering
11-06 22:20:02.741 1174-1219/com.package A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 1219 (RenderThread)
以前没遇到过这个问题
最佳答案
好吧,这个错误是由于我忘记在一个模块中关闭输入流,所以如果你们使用任何流,请仔细检查它并确保关闭所有打开的流:)
关于java.lang.OutOfMemoryError : Could not allocate JNI Env always android java 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40451877/