我正在尝试构建我的Android应用程序,编译得很好,直到几天前。现在,我不得不移动我的项目,我做了一些更改,我需要重建它,但是我收到以下错误:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find any version that matches com.nineoldandroids:library:2.4.+.
Searched in the following locations:
https://jcenter.bintray.com/com/nineoldandroids/library/maven-metadata.xml
https://jcenter.bintray.com/com/nineoldandroids/library/
https://oss.sonatype.org/content/repositories/snapshots/com/nineoldandroids/library/maven-metadata.xml
https://oss.sonatype.org/content/repositories/snapshots/com/nineoldandroids/library/
https://maven.fabric.io/public/com/nineoldandroids/library/maven-metadata.xml
https://maven.fabric.io/public/com/nineoldandroids/library/
file:~/Android/Sdk/extras/android/m2repository/com/nineoldandroids/library/maven-metadata.xml
file:~/Android/Sdk/extras/android/m2repository/com/nineoldandroids/library/
file:~/Android/Sdk/extras/google/m2repository/com/nineoldandroids/library/maven-metadata.xml
file:~/Android/Sdk/extras/google/m2repository/com/nineoldandroids/library/
Required by:
MyApp:app:unspecified > com.github.navasmdc:MaterialDesign:1.2
nineoldandroids
和~/Android/Sdk/extras/google/m2repository/com/
~/Android/Sdk/extras/android/m2repository/com/
我该如何解决这个问题?
=== EDIT === 我的app build.gradle:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "org.lh.xxx"
minSdkVersion 16
targetSdkVersion 22
multiDexEnabled true
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:support-v4:23.0.0'
compile('com.github.afollestad.material-dialogs:core:0.8.5.3@aar') {
transitive = true
}
compile('com.github.afollestad.material-dialogs:commons:0.8.5.3@aar') {
transitive = true
}
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
compile 'com.github.navasmdc:MaterialDesign:1.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.1.0'
compile 'com.squareup.okhttp:okhttp:2.1.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'joda-time:joda-time:2.3'
compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
compile 'com.andreabaccega:android-form-edittext:1.2.1@aar'
compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
transitive = true;
}
compile files('libs/nineoldandroids-2.4.0.jar')
}
答案 0 :(得分:3)
NineOldAndroids 已弃用。不会有新的发展。现有版本(当然)将继续运作。新应用程序应使用 minSdkVersion="14" or higher which has access
加入平台动画API。
错误:配置项目':app'。
时出现问题无法解析配置':app:_debugCompile'的所有依赖项。 找不到与com.nineoldandroids匹配的任何版本:library:2.4。+。
您可以使用compile 'com.nineoldandroids:library:2.4.0'
dependencies
{
compile 'com.nineoldandroids:library:2.4.0'
}
修改强>
在编译compile files('libs/nineoldandroids-2.4.0.jar')
之前移动'com.github.navasmdc:MaterialDesign:1.2'
。
答案 1 :(得分:1)
此图书馆不是由Google发布的,而是由杰克沃顿发布的。您可以从GitHub下载它或从Maven获取链接。
我不知道您项目中发生了什么,但您可以清除它并再次添加。要从Maven获取它,请按以下步骤操作:
在Android Studio中打开模块设置,转到“依赖关系”选项卡,找到nineoldandroid并将其删除。然后使用那个小' +'添加库依赖项。在右边。键入' nineoldandroids',搜索,选择您想要的那个并单击确定。
答案 2 :(得分:0)
包括在您的项目中
此库显示为.jar文件,您可以将其包含在.jar文件中 应用程序的libs /文件夹。您可以下载最新版本 来自GitHub下载页面。