我正在重新访问大约一年前协助的项目。我是从事该项目的最后一个人,此后没有任何更改。
我从Github中提取了该项目,并尝试在Android Studio中进行构建,但是在gradle同步期间我一直遇到此错误:
Could not find MaterialShowcaseView.aar (com.github.deano2390:MaterialShowcaseView:1.1.0).
Searched in the following locations:
https://jitpack.io/com/github/deano2390/MaterialShowcaseView/1.1.0/MaterialShowcaseView-1.1.0.aar
这是build.gradle文件:
build.gradle(应用程序)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "app.id.here"
minSdkVersion 15
targetSdkVersion 25
versionCode 0
versionName "0.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:support-v4:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'com.android.support:support-v4:25.0.1'
compile 'com.github.deano2390:MaterialShowcaseView:1.1.0'
compile 'junit:junit:4.12'
}
build.gradle(项目)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.4-3'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply plugin: 'kotlin'
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
/*task clean(type: Delete) {
delete rootProject.buildDir
}*/
/*android {
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}*/
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
repositories {
mavenCentral()
}
我上一次从事这个项目时,从来没有遇到过这个问题。而且我在https://github.com/deano2390/MaterialShowcaseView查看了MaterialShowcaseView的github存储库,没有类似的问题。我尚未将此问题发布到存储库中,因为我想确保这不是我的Android Studio出现问题,并且应用的gradle版本冲突。
此问题可能是什么原因,我该如何解决?