添加Material Spinner依赖项时,Gradle sync错误

时间:2017-09-22 07:17:18

标签: android github gradle build android-spinner

尝试添加Material Spinner的最新版本(2.0.0)的依赖项时,我的gradle同步失败并显示错误:

export function filterTemplateAttributes(attributes)
{
  return filter(function(attribute) { return attribute.CategoryNames[0] == "Well Readings"; },attributes );
}

export function loadWellSignals() {
  var that = this;
  //ajax call
  AfModel.getAfDatabase(function(afDatabase) {
   //ajax call
    AfModel.getTemplates(afDatabase,function(templates) {
      var wellTemplates = filter(function(template) { return 
             template.BaseTemplate =="Wells";},templates.Items);
      var totalSignals = [];
      wellTemplates.forEach(function(wellTemplate) {
        //ajax call
        AfModel.getTemplateAttributes(wellTemplate,function(attributes) {
          //this will return an array, store this result in to one array totalSignals for all the for each calls.
         var wellReadings= that.filterTemplateAttributes(attributes.Items);                            
      })
    });
  });
 });
}

这是我的build.grade

Error:(33, 14) Failed to resolve: com.github.ganfra:material-spinner:2.0.0

但是当我更改Material Spinner version to 1.1.1时,草图同步完成没有任何错误。

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "com.myroommate.myroommate"
    minSdkVersion 23
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.volley:volley:1.0.0'
compile ('com.github.ganfra:material-spinner:2.0.0') {
    exclude group: 'com.android.support', module: 'appcompat-v7'
}
}

即使使用1.1.2也会使我的gradle构建失败。我想使用最新版本的Material Spinner,所以我在这里做错了什么?

1 个答案:

答案 0 :(得分:1)

该版本尚未被推送到maven。 很快就会好起来的。 检查this