目錄
前言
記錄開發中遇到的 bug,不再讓自己重複地被同樣的 bug 折磨。
正文
1. Error: Static interface methods are only supported starting with Android N (–min-api 24)
時間:2019年9月16日20:31:41
問題描述:在升級 butterknife 後報出這個錯誤。
問題分析:查看 https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md#version-900-rc2-2018-11-19。
解決辦法:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
最後
代碼出錯了,關鍵是要仔細查看日誌。能夠仔細地查看日誌,就離解決問題很近了。