首页 > 解决方案 > 无法解决 gradle build szagurskii

问题描述

我一直在尝试将依赖项的等级构建添加到 Android Studio 中。它说未能解决。我需要帮助...

无法解析 com.szagurskii:patternedtextwatcher:0.5.0

实施 'com.squareup.retrofit2:converted-gson:2.3.0'

这是我的gradle构建

   apply plugin: 'com.android.application'

  android {
   compileSdkVersion 27
defaultConfig {
    applicationId "my.wedee.com.wedeeapplication"
    minSdkVersion 14
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
   }
 }

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:27.1.1'
        implementation 'com.android.support.constraint:constraint-layout:1.1.0'
        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.android.support:cardview-v7:27.1.1'
   implementation 'com.android.support:design:27.1.1'
   implementation 'com.rengwuxian.materialedittext:library:2.1.4'
   implementation 'com.szagurskii:patternedtextwatcher:0.5.0'
   implementation 'com.github.d-max:spots-dialog:0.7@aar'
   implementation 'com.squareup.retrofit2:retrofit:2.3.0'
   implementation 'com.squareup.retrofit2:converted-gson:2.3.0'
     }

标签: androidgradle

解决方案


无法解析 com.szagurskii:patternedtextwatcher:0.5.0

您应该在您的项目级别 build.gradle部分添加以下内容。

您可以使用快照

implementation 'com.szagurskii:patternedtextwatcher:0.6.0-SNAPSHOT'

然后

allprojects {
    repositories {
    google()
    jcenter()
      maven {
        url "https://oss.sonatype.org/content/repositories/snapshots"
      }
    }
}

然后Clean-Rebuild-Run (With Internet)


推荐阅读