![](/img/trans.png)
[英]Kubernetes - java.lang.OutOfMemoryError: unable to create new native thread
[英]java.lang.OutOfMemoryError: unable to create new native thread
最近更新到android 2.2。
試圖打開現有項目。 它促使我轉換,我接受了。 該項目成功導入,但每當我嘗試建設時,我得到:
Error:Execution failed for task ':app:mergeDebugResources'. > java.lang.OutOfMemoryError: unable to create new native thread
我已經添加了 :
org.gradle.daemon=false
GRADLE_OPTS="-Xmx2048m -Xms2048m -XX:MaxPermSize=1024m"
org.gradle.jvmargs=-XX:MaxPermSize=512m
to gradle.properties。 它仍然沒有奏效。
您有機會面對java.lang.OutOfMemoryError: Unable to create new native thread
每當JVM從操作系統請求java.lang.OutOfMemoryError: Unable to create new native thread
時,都java.lang.OutOfMemoryError: Unable to create new native thread
。 只要底層操作系統無法分配新的本機線程,就會拋出此OutOfMemoryError。 本機線程的確切限制非常依賴於平台,因此我們建議通過運行類似於以下示例的測試來找出這些限制。 但是,一般情況下,導致java.lang.OutOfMemoryError: Unable to create new native thread
的情況java.lang.OutOfMemoryError: Unable to create new native thread
將經歷以下階段:
參考: https : //plumbr.eu/outofmemoryerror/unable-to-create-new-native-thread
從2.2.0切換回gradle 2.1.3修復了問題。
從這個線程 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.