Android Studio3.5.1 上使用butterknife

首先在你的Module中的build.gradle中的

dependencies {// butterknife
 api   'com.jakewharton:butterknife:8.8.1'
 annotationProcessor  'com.jakewharton:butterknife-compiler:8.8.1'
}

引入前綴是api否則App和其他Module中無法導包

implementation只能本Module使用

 

然後App下或其他Module的build.gradle中需要引入

annotationProcessor  'com.jakewharton:butterknife-compiler:8.8.1'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章