Я работаю над проектом https://github.com/UdacityAndroidDevScholarship/blood-donation
Я пытаюсь использовать свой собственный ключ Firebase и Google API. Я добавил все зависимости и Firebase SDK, но когда я пытаюсь синхронизировать проект. Я получил следующую ошибку
ERROR: Supplied String module notation 'deps.android.support.design' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.
Open File
Мой app build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion buildConfig.compileSdk
defaultConfig {
applicationId "com.udacity.nanodegree.blooddonation"
minSdkVersion buildConfig.minSdk
targetSdkVersion buildConfig.targetSdk
versionCode buildConfig.version.code
versionName buildConfig.version.name
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
buildTypes.each {
it.resValue('string', "google_maps_key", propOrThrow('GOOGLE_MAPS_API_KEY'))
}
}
lintOptions {
textReport true
textOutput 'stdout'
lintConfig rootProject.file('lint.xml')
checkDependencies true
checkTestSources true
explainIssues false
}
dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
// Support lib
implementation "deps.android.support.appcompatV7"
// Support Design
implementation "deps.android.support.design"
// Constraint layout
implementation "deps.android.support.design"
implementation 'com.google.firebase:firebase-analytics:17.2.0'
// Firebase Auth
implementation "deps.google.firebase.auth"
// Realtime database
implementation "deps.google.firebase.database"
//Country code picker
// https://android-arsenal.com/details/1/5753 // TODO: move to project level gradle
implementation 'com.github.joielechong:countrycodepicker:2.1.5'
// Leak canary
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
debugImplementation "deps.square.leackcanary.debug"
releaseImplementation "deps.square.leackcanary.release"
// Timber - Logging library
implementation "deps.square.leackcanary.release"
// Fused location
implementation "deps.square.leackcanary.release"
// Geo-fire
implementation "deps.google.firebase.geo_fire"
// Map
implementation "deps.google.play_services.maps"
// PinView // TODO: move to project level gradle
implementation 'com.github.GoodieBag:Pinview:v1.3'
implementation "deps.google.play_services.maps"
implementation "deps.google.play_services.maps"
testImplementation "deps.junit"
androidTestImplementation "deps.android.support.test.runner"
androidTestImplementation "deps.android.support.test.espressoCore"
}
apply plugin: 'com.google.gms.google-services'
Когда я нажимаю на ошибку, я беру на implementation "deps.android.support.design"
МойПроект build.gradle это:
buildscript {
ext.versions = [
'supportLibrary' : '27.1.1',
'constraintLayout': '1.1.0',
'firebase' : '15.0.2',
'testRunner' : '1.0.1',
'espressoCore' : '3.0.1',
'leak_canary' : '1.5.4',
'timber' : '4.7.0',
'play_services' : '15.0.0',
'geo_fire' : '2.3.1',
'gson' : '2.8.4',
'fcm' : '15.0.2',
'firebase_auth' : '15.1.0',
'firebase_database':'15.0.0'
]
ext.buildConfig = [
'compileSdk': 27,
'targetSdk' : 27,
'minSdk' : 16,
'isSnapshot': false,
'version' : [
'major' : 1,
'minor' : 0,
'patch' : 0,
'classifier': null, // dev, beta, alpha etc.
]
]
String versionName = "${buildConfig.version.major}.${buildConfig.version.minor}.${buildConfig.version.patch}"
if (buildConfig.version.classifier == null) {
if (buildConfig.isSnapshot) {
buildConfig.version.classifier = 'SNAPSHOT'
}
}
if (buildConfig.version.classifier != null) {
versionName += "-" + buildConfig.version.classifier
}
ext.buildConfig.version['name'] = versionName
ext.buildConfig.version['code'] = buildConfig.version.major * 100000 + buildConfig.version.minor * 10000 + buildConfig.version.patch * 100
ext.deps = [
'android': [
'support': [
'appcompatV7' : "com.android.support:appcompat-v7:${versions.supportLibrary}",
'annotations' : "com.android.support:support-annotations:${versions.supportLibrary}",
'constraintLayout': "com.android.support.constraint:constraint-layout:${versions.constraintLayout}",
'design' : "com.android.support:design:${versions.supportLibrary}",
'test' : [
'runner' : "com.android.support.test:runner:${versions.testRunner}",
'espressoCore': "com.android.support.test.espresso:espresso-core:${versions.espressoCore}"
]
],
],
'google' : [
'firebase': [
'auth': "com.google.firebase:firebase-auth:${versions.firebase_auth}",
'database':"com.google.firebase:firebase-database:${versions.firebase_database}",
'geo_fire':"com.firebase:geofire-android:${versions.geo_fire}",
'cloud_messaging':"com.google.firebase:firebase-messaging:${versions.fcm}"
],
'play_services':[
'location':"com.google.android.gms:play-services-location:${versions.play_services}",
'maps':"com.google.android.gms:play-services-maps:${versions.play_services}"
],
'gson':[
'gson': "com.google.code.gson:gson:${versions.gson}"
]
],
'square':[
'leackcanary':[
'debug':"com.squareup.leakcanary:leakcanary-android:${versions.leak_canary}",
'release':"com.squareup.leakcanary:leakcanary-android-no-op:${versions.leak_canary}"
]
],
'other':[
'timber':"com.jakewharton.timber:timber:${versions.timber}"
],
'junit' : 'junit:junit:4.12'
]
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.google.gms:google-services:3.2.1'
classpath 'com.google.gms:google-services:4.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" }
}
// Force all of the primary support libraries to use the same version.
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support') {
details.useVersion versions.supportLibrary
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
def propOrThrow(String name) {
if (hasProperty(name))
return getProperty(name)
else
throw new GradleException("Can't find property `$name`, make sure you have added them to the global 'gradle.properties' file")
}
Пожалуйста, пожалуйста, помогите мне. Я не понял эту ошибку