Android Studio3.5.1 上使用butterknife

mac2024-06-01  40

首先在你的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'
最新回复(0)