close

我們在 Android Studio 的 Event Log 若遇到下列警告

Project tw-bank-android is using the following JDK location when running Gradle: XXX
        Using different JDK locations on different processes might cause Gradle to
        spawn multiple daemons, for example, by executing Gradle tasks from a terminal
        while using Android Studio.

 

依字面上意思可理解是使用的 JDK 位置不同所導致產生多個守護進程

那麼什麼是守護進程呢?

簡單來說 IDE 會有一個常駐的 gradle 守護進程,可以提高我們 Build 的效率。節省每次都重新啟動 JVM 的消耗,而且也能緩存一些資訊

 

那我們該怎麼解掉這個問題呢?

我們可以到 Project Structure 裡的 SDK Location 去設定 JDK 位置即可,如下圖

截圖 2022-09-26 下午3.34.46

 

 

 

 

 

 

 


arrow
arrow

    顏澤偉 發表在 痞客邦 留言(0) 人氣()