IDEA中遇到One of the two will be used. Which one is undefined.


某次啟動idea的時候看到控制台提示如下錯誤 : 

objc[11289]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java (0x101d564c0) 
and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x101de64e0). One of the two will be used. Which one is undefined.

一番google后, 找到答案 :

1.close the project in intelliJ
2.File -> New -> project from existing resources
3.use Import from external model (if any)
4.open the project again.

目前發現其實是因為機器上新裝了一個JDK, 導致之前項目設置的JDK "人格分裂"

右鍵項目 -> open module settings -> Project

在project jdk上edit,然后選一個最新的jdk即可


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM