zoukankan      html  css  js  c++  java
  • ButterKnife 8.4注入失败

    1,第一步:项目的gradle中增加 classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    buildscript {
    repositories {
    jcenter()
    mavenCentral()
    }
    dependencies {
    classpath 'com.android.tools.build:gradle:2.3.0'
    classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
    }
    }

    2,第二步:在使用ButterKnife框架的相应gradle中增加如下
    2.1
    apply plugin: 'com.android.application'
    apply plugin: 'android-apt'

    2.2
    android {
      compileOptions {
      sourceCompatibility JavaVersion.VERSION_1_7
      targetCompatibility JavaVersion.VERSION_1_7
      }

    }

    2.3
    dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
      compile "com.jakewharton:butterknife:8.4.0"
      apt "com.jakewharton:butterknife-compiler:8.4.0"
    }
  • 相关阅读:
    IO模型
    协程
    线程
    进程
    网络编程
    模块二
    面向对象(二)
    面向对象(一)
    优化异常报错
    python 模块
  • 原文地址:https://www.cnblogs.com/wf-l5201314/p/6795209.html
Copyright © 2011-2022 走看看