1、拼寫警告
表象:當自定義變量不是一個單詞時,會有以下警告,
Inspection info: Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click
翻譯后:拼寫檢查器檢查可以幫助查找拼寫錯誤和拼寫錯誤在您的代碼、 注釋和文本、 並修復它們中一次點擊
解決辦法1:
雙擊下面有虛線的單詞——>鼠標右鍵——>spelling——>save 'xxx' to distionary
解決辦法2:如圖,preferences->Editor->Inspections-Spelling->Typo,取消勾選
2、Method is never used
表象:類,對象,方法,變量不分權限全部提醒
解決辦法:私有對象,私有方法,變量需要警告,共有的不需要警告
preferences->Editor->Inspections->Java->Declaration redundancy->Unsed declaration。設置類,方法,對象,變量的訪問權限
3、代碼重復提醒
表象:重復代碼,會提示Finds duplicated code
解決辦法1:對重復功能進行封裝
解決辦法2:preferences->Editor->Inspections->General->Duplicated Code 取消勾選
4、 錯誤標簽(Wrong tag)
表象:- no javadoc where it is required - required tag is missing - invalid or incomplete tag - javadoc description is missing or incomplete
解決:preferences->Editor->Inspections->JavaDoc 取消勾選
5、變量重新分配地址或參數
表象:變量下有__
解決辦法:preferences->Editor->Color Scheme->language Defaults->... 如圖
6、XML錯誤警告
表象:References to the non-instantiable classes ,References to the classes that do not extend required class ,References to classes with inappropriate scope ,Empty tag and attribute values,
Tag and attribute values that do not match required pattern (e.g. Java Identifiers),Tags that do not include required children tags or attributes,Tags that define objects with duplicate names
解決辦法:preferences->Editor->Inspections->General
7、創建類時,偶爾出現Cannot create Class,Unable to parse template
解決辦法:Help->Edit Custom VM Options...
在文件末尾增加:-Djdk.util.zip.ensureTrailingSlash=false,重啟idea
8、idea開啟時停留在項目選擇頁