溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Android Studio error: Unable to start the daemon process怎么解決

發(fā)布時間:2020-10-29 20:16:57 來源:億速云 閱讀:192 作者:Leah 欄目:開發(fā)技術(shù)

Android Studio error: Unable to start the daemon process怎么解決?很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學(xué)習(xí)下,希望你能有所收獲。

在 Android Studio 上新建項目,出現(xiàn) Unable to start the daemon process. 錯誤,具體錯誤信息如下:

Error:Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

解決方法一、

方法一:刪除 C:\Users\UserName\.gradle 目錄,重新啟動 Android Studio即可。重啟動后,它會自動為你創(chuàng)建一個新的。

方法二:修改配置。File -> Settings. 選擇左邊導(dǎo)航欄的Compiler項,設(shè)置 VM Options 為 -Xmx512m即可。

方法三:其它應(yīng)該,留出更多的內(nèi)存空間試試。

解決方法二、

在stackoverflow上找到解決方法:
Android Studio默認為Gradle daemon process分配的heap size過大(windows平臺下默認最大heap size為:75% of total physical memory up to 1 GB),所以容易造成空間不足無法啟動的問題。把空間配置稍小一點即可。
在Android Studio中進入

File->Settings->Compiler

將VM Options配置為一個較小的值,如-Xmx512m。

重啟Android Studio問題解決。

解決方法三、

1、可能是由于殺毒軟件等卸載或者禁止了daemon進程,因此,重啟電腦可以解決該問題.
2、進入Chapter 6. The Gradle Daemon進行配置,其主要講述C:\Users\Administrator\.gradle路徑下(其中Administrator是自己的用戶名),新建gradle.properties文件,并寫入org.gradle.daemon=true

一般添加 org.gradle.jvmargs=-Xmx512m 好了

看完上述內(nèi)容是否對您有幫助呢?如果還想對相關(guān)知識有進一步的了解或閱讀更多相關(guān)文章,請關(guān)注億速云行業(yè)資訊頻道,感謝您對億速云的支持。

向AI問一下細節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI