我一直试图在依赖项中添加成绩构建到andriod studio。它说无法解决。我需要帮助...
无法解析com.szagurskii:patternedtextwatcher:0.5.0
实施' com.squareup.retrofit2:converted-gson:2.3.0'
这是我的gradle build
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'
}
答案 0 :(得分:0)
无法解析com.szagurskii:patternedtextwatcher:0.5.0
您应在 PROJECT LEVEL build.gradle
部分添加以下内容。
您可以使用 SNAPSHOT
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)
。
答案 1 :(得分:0)
patternedtextwatcher通过jCenter而不是Maven分发
https://bintray.com/zsavely/maven/patternedtextwatcher/0.5.0
确保你的项目级build.gradle中有jcenter,类似这样;
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}