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"
    }
  • 相关阅读:
    TinyOS在ubuntu 14.04下安装教程
    C++ STL标准入门
    C++ 模板
    多态
    C++继承
    C++类型转换 -- 由其他类型转换到自定义类型
    运算符重载
    友元
    typedef用法
    c++细节--section1
  • 原文地址:https://www.cnblogs.com/wf-l5201314/p/6795209.html
Copyright © 2011-2022 走看看