当我将以下行添加到依赖项的build.gradle行时,Android Studio显示此错误消息:compile 'com.android.volley:volley:1.0.0'
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.parse.starter"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.parse.bolts:bolts-tasks:1.3.0'
compile 'com.parse:parse-android:1.13.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.google.code.gson:gson:2.8.0'
compile 'org.jetbrains:annotations-java5:15.0'
compile 'com.android.volley:volley:1.0.0'
}
答案 0 :(得分:6)
查看项目gradle中的存储库中是否有jcenter()。
例如:
authenticateCredentials(usernameString: "user", passwordString: "pass") { (isAuth:Bool) in
self.isAuth = isAuth
// go on with whatever you want to do and use self.isAuth successfully
}