android - Material 对话框库 :Failed to find: com. android.support :appcompat-v7:21. 0.3

标签 android android-studio

我要添加 material-dialogs库添加到我的项目,但我收到此错误 Error:Failed to find: com.android.support:appcompat-v7:21.0.3 This is build.gradle..是我的错吗?我的项目有什么问题吗?

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.1"

defaultConfig {
    applicationId "com.peomtime.tosca.peomtime"
    minSdkVersion 15
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.+'
compile 'de.hdodenhof:circleimageview:1.2.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
//Core
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.1'
compile 'com.github.machinarius:preferencefragment:0.1.1'

//compile 'com.github.nirhart:parallaxscroll:1.0'
compile project(':Parallax')

compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'

compile 'com.afollestad:material-dialogs:0.6.3.1'
}

非常感谢你的帮助

最佳答案

检查您是否在 Android SDK 管理器中安装了最新的库。对于 appcompat-v7:21.0.3,需要检查/更新的包是:

  • Android 支持存储库
  • Android 支持库

此外,建议修复您的依赖版本,而不是使用 + 获取最新版本:

compile 'com.android.support:appcompat-v7:21.0.3'

关于android - Material 对话框库 :Failed to find: com. android.support :appcompat-v7:21. 0.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28761872/

相关文章:

android - 在不启动的情况下在Android中重置动画

java - 在 PreferenceScreen 中显示 ActionBar 看起来很困惑

debugging - Android Studio默认以 Debug模式启动

android-studio - "Intel Atom Image"、 "Google APIs Intel Atom image"和 "Google play Intel Atom Image"之间有什么区别?

android - mediarecorder.setVideoSize() 以最大分辨率失败

android - 标题栏上的进度条

java - Retrofit2 复杂请求

android-studio - 这可以在 Android Studio 中使用 TestNG 运行测试吗?

android multidex 实现

android-studio - 如何在 Kotlin 文件中的 Android Studio 中控制何时将 Imports 替换为通配符