as butterknife plugin use

 

Motion picture usage details



 

 

1. Install the plugin



 

 

2. Configure gradle 

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
 
    compile 'com.jakewharton:butterknife:8.5.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
 

    compile "com.android.support:support-v4:$SUPPORT_VERSION"
    compile "com.android.support:design:$SUPPORT_VERSION"

    testCompile "junit:junit:$JUNIT_VERSION"

}

 

apply plugin: 'com.jakewharton.butterknife'

 

buildscript {
    repositories {
        jcenter ()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
        classpath 'org.greenrobot:greendao-gradle-plugin:3.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter ()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

 

3. Use



 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Donate to developers

Driven by interest, I write 免费something with joy and sweat. I hope you like my work and can support it at the same time. Of course, if you have money to support a money field (support Alipay and WeChat donations, join the it technology buckle group), but have no money to support a personal field, thank you.



 
 
 Thank you for your sponsorship, I will do better!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326207045&siteId=291194637