java.lang.OutOfMemoryError: unable to create new native thread
来源:互联网 发布:网络推广报价 编辑:程序博客网 时间:2024/05/29 17:12
最新项目有版本更新,在打渠道包的时候老是刚打了一两个包的时候,就会抛出一个异常,导致打包失败:
java.lang.OutOfMemoryError: unable to create new native thread
由字面意思也可以知道是内存溢出了,在网上查了一下,说是创建了太多的线程。但是同样环境下,我们另外一个项目用相同的方式打包就没有出现这个问题,而且另外一个项目比出现问题的项目还要复杂一些,stackoverflow有人遇到了同样的问题:
http://stackoverflow.com/questions/39599959/android-studio-2-2-gradle-build-fails-with-java-lang-outofmemoryerror-unable-t
他是把gradle插件版本回退解决的,猜想可能与gradle打包有关,对比了一下两个项目,发现编译版本不同,出现问题的项目编译版本较低,于是我把它从:
buildToolsVersion '21.1.2'
升级成:
buildToolsVersion '24.0.1'
问题解决。
具体什么原因还是没搞清,可能是旧的编译工具开启线程的极限过小,所以项目中以后还是用较新的吧
阅读全文
0 0
- java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- linux java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- 解决 - java.lang.OutOfMemoryError: unable to create new native thread
- Kotlin语法(五)
- iOS 开发实用工具(持续更新)
- Spring in Action之AOP
- nodejs 运行后报错 Error: Couldn't find preset "es2015" relative to directory
- 穷人的语义处理工具箱之二:语义编辑距离
- java.lang.OutOfMemoryError: unable to create new native thread
- druid的springmvc配置 和java jdbc配置
- Java Web前端到后台常用框架介绍
- iOS NSUserDefaults 简介,使用 NSUserDefaults 存储自定义对象
- PostgreSQL数据库、表空间、角色及用户
- Hadoop原理汇总(二)——MapReduce
- 2048
- ExpandableStickyListHeadersListView遇到的一个问题
- Java进程互斥–FileLock