android - 实现 'com.github.prolificinteractive:material-calendarview:2.0' 无法解析

标签 android calendarview

为什么我的素材日历 View 解析失败,这是我的 模块:应用

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.project.cms"
        minSdkVersion 22
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner 
  "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android- optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
    implementation 'com.android.support:design:26.0.0-beta1'
    implementation 'com.android.support:support-v4:26.0.0-beta1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2'
    implementation 'com.github.ybq:Android-SpinKit:1.2.0'
    implementation 'com.android.support:cardview-v7:26.0.0-beta1'
    implementation 'com.android.support:recyclerview-v7:26.0.0-beta1'
    implementation 'com.github.prolificinteractive:material-calendarview:2.0'

}

这是我的构建文件

buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

当我同步 gradle 时,显示的错误是

Failed to resolve: com.github.prolificinteractive:material-calendarview:2.0

open.dependency.in.project.structure 受影响的模块 app 请帮助我

最佳答案

你的依赖版本有问题

implementation 'com.github.prolificinteractive:material-calendarview:2.0'

替换为

implementation 'com.github.prolificinteractive:material-calendarview:2.0.0'

关于android - 实现 'com.github.prolificinteractive:material-calendarview:2.0' 无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55193054/

相关文章:

android - 在日历 View 中添加文本

java - CalendarView 环绕当前月份的高度

android - 什么opengl es 2没有设置矩阵模式的方法?

android - 为 DialogFragment 选择容器

java - 设置最大日期(日期选择器)

java - 如何在Android Studio上选择日期后打开对话框?

java - 找不到 Android CalendarView 类

java - 从 LinearLayout 按下图像时打开默认应用程序

java - Android自定义 View 中的可变大小

java - 用于日历 View 的 GridView