Android Butterknife实施错误说编译已过时,并已由'implementation'和'api'取代

时间:2018-12-06 08:29:33

标签: java android gradle dependencies butterknife

我已经在build.app文件中实现了以下

//dependency for view implementation
implementation 'com.jakewharton:butterknife:9.0.0-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'

在我的项目中,但是当我运行应用程序时,出现以下错误:

配置'compile'已过时,并已由'implementation'和'api'代替。 它将在2018年底删除。有关更多信息,请参见

 //code of gradle
 apply plugin: 'com.android.application'

 android {
 compileSdkVersion 28
 defaultConfig {
    applicationId "xyc.com"
    minSdkVersion 15
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner 
     "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
       'proguard-rules.pro'
      }
     }
   }

 dependencies {
     implementation fileTree(dir: 'libs', include: ['*.jar'])
     implementation 'com.android.support:appcompat-v7:28.0.0'

  implementation'com.android.support.constraint:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

//recyclerview dependency
implementation 'com.android.support:recyclerview-v7:28.0.0'

compile 'com.android.support:cardview-v7:28.0.+'

implementation 'com.google.android.gms:play-services-location:15.0.1'

//dependency for view implementation
implementation 'com.jakewharton:butterknife:9.0.0-rc2'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc2'
}

0 个答案:

没有答案