AndroidAnnotations与ButterKnife
因为AndroidAnnotations是自动构建了一个新的Activity 给重构代码带来很多的不方便 我推荐butterknife 引入方式: //AndroidAnnotations annotationProcessor "org.androidannotations:androidannotations:4.3.1" compile group: 'org.androidannotations', name: 'androidannotations-api', version: '4.3.1' //butterknife annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0' compile 'com.jakewharton:butterknife:8.8.0' 举例:butterknife dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:design:25.3.1' compile 'com.squareup.retrofit2:retrofit:2.3.0' compile 'com.squareup.picasso:picasso:2.5.2' //Gson compile 'com.google.code.gson:gson:2.6.2' //zxing compile(project(':zxing-android-embedded')) { transitive = true } //butterknife annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0' compile 'com.jakewharton:butterknife:8.8.0' //test testCompile 'junit:junit:4.12' }
相关推荐
sheikhdz 2020-05-18
humanbeng 2020-03-05
一抹离愁 2019-12-11
Geeny 2019-06-30
QiuYangAndZhang 2019-06-30
Palingenesis 2019-06-28
sheikhdz 2019-06-27
一抹离愁 2019-06-26
OliverLau 2019-06-20
sheikhdz 2017-05-05
大白ol 2017-04-20
humanbeng 2016-08-09
绿豆饼 2016-06-03
QiuYangAndZhang 2016-05-18
sheikhdz 2015-09-23
静博圣宇 2015-08-14
一抹离愁 2014-10-23
WYHHealer 2014-07-01