1. Add the following two lines of code in build.gradle
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
2.点sync Now
3. Open the Android Studio's settings, search ButterKnife in Plugins, click the installation (I have completed the installation), installing the need to restart AS
4. When
. Unknown host 'd29vzk4ow07wi7.cloudfront.net' You may need to adjust the proxy settings in Gradle error, resolve as follows:
build.gradle modification under the project root directory
Aliyun added in (the google) mirror maven {url'http: //maven.aliyun.com/nexus/content/groups/public/ '}
5 compiler that there is no error.
6. Right-click the active_main MainActivity
Then completed, some of the specific usage can refer https://blog.csdn.net/zyw0101/article/details/80399225