android - Material 设计库需要 oldnineandroids 2.4.+ : build failed

标签 android gradle android-gradle-plugin material-design

我正在尝试构建我的 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

~/Android/Sdk/extras/google/m2repository/com/~/Android/Sdk/extras/android 中没有文件夹 nineoldandroids/m2repository/com/

我该如何解决这个问题?

===编辑=== 我的应用程序 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')
}

最佳答案

NineOldAndroids 已弃用。不会有新的发展。现有版本将(当然)继续运行。新应用程序应使用 minSdkVersion="14"或更高版本,可以访问 平台动画 API。

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.+.

您可以使用compile 'com.nineoldandroids:library:2.4.0'

dependencies 
   {
   compile 'com.nineoldandroids:library:2.4.0'
   }

编辑

在编译 'com.github.navasmdc:MaterialDesign:1.2' 之前移动 compile files('libs/nineoldandroids-2.4.0.jar')

关于android - Material 设计库需要 oldnineandroids 2.4.+ : build failed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34764334/

相关文章:

几个按钮的Android小部件onclick监听器

android - 在fragment中添加ProgressBar Webview

android - 将自定义微调器库从 Java 转换为与 Kotlin 一起使用。监听器的问题

android - 无法解决依赖android studio

android - 使用另一个库项目作为外部依赖编译 gradle 库项目

android - 如何在整个项目中使用相同的库?

android - 从 phonegap 应用程序中删除不必要的权限

java - 如何安全地使用 ArrayList 子列表以避免首次进入

cordova - Android使用Phonegap编译时出错。类似于Gradle Android构建工具

android - 在Android Studio中成功 "Rebuild Project"后执行Python脚本