ButterKnife失效的解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lftaoyuan/article/details/52515485

今天用ButterKnife8.4.0发现失效了,根据官网提示,解决办法如下:


更新:


抱歉,html编辑器实在太恶心了,写完了一直都没看过,用MarkDown重写了一篇,请看这篇

CSDN:

http://blog.csdn.net/lftaoyuan/article/details/60578573

简书:

http://www.jianshu.com/p/a16c5783e17f



<span style="font-size:24px;">Download

APP.GRADLE

apply: 'com.neenbedankt.android-apt'</span>
<span style="font-size:24px;">//如果上面的不行,就换成下面这句,把应用改成应用插件</span><pre name="code" class="java"><span style="font-size:24px;">//apply plugin: 'com.neenbedankt.android-apt'</span>
dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:design:23.4.0' compile 'com.jakewharton:butterknife:8.4.0' apt 'com.jakewharton:butterknife-compiler:8.4.0' }


<span style="font-size:24px;">APPLICATION.GRADLE</span>
<pre name="code" class="java"><span style="font-size:24px;">buildscript{
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
	//就是下面这句,然后Try Now吧
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}</span>







阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页