【发布时间】:2019-04-11 06:11:15
【问题描述】:
我正在尝试构建我的 Android 项目,但是当我重新构建时收到以下错误消息:
找不到 com.jakewharton:butterknife-compiler:5.1.2。 在以下位置搜索: 文件:/C:/Android/android-sdk/extras/m2repository/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.pom
文件:/C:/Android/android-sdk/extras/m2repository/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.jar 文件:/C:/Android/android-sdk/extras/google/m2repository/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.pom 文件:/C:/Android/android-sdk/extras/google/m2repository/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.jar 文件:/C:/Android/android-sdk/extras/android/m2repository/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.pom 文件:/C:/Android/android-sdk/extras/android/m2repository/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.jar https://jcenter.bintray.com/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.pom https://jcenter.bintray.com/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.jar https://dl.google.com/dl/android/maven2/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.pom https://dl.google.com/dl/android/maven2/com/jakewharton/butterknife-compiler/5.1.2/butterknife-compiler-5.1.2.jar 要求: 项目:应用程序
这是我的 build.gradle 模块:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.wakeup.xxx"
minSdkVersion 18
targetSdkVersion 25
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(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:25.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.jjoe64:graphview:4.2.2'
implementation 'com.jakewharton:butterknife:5.1.2'
annotationProcessor 'com.jakewharton:butterknife-compiler:5.1.2'
// https://mvnrepository.com/artifact/com.jakewharton/butterknife
}
buildscript {
repositories {
google() // <--here
}
}
allprojects {
repositories {
google() // <-- here
}
}
有人可以帮我吗?
【问题讨论】:
-
您的项目
:app缺少黄油刀参考。当您忘记正确定义模块依赖项时,通常会发生这种情况。请发布您的build.gradle文件。 -
刚刚添加了坦克
标签: android android-studio jar