classpath 'com. android .tools.build: gradle: 3.5.2' classpath 'com.google.gms: google-services: 4.3.3'
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' implementation 'com.google.android.material:material:1.0.0' implementation 'com.google.firebase:firebase-analytics:17.2.2'
} применить плагин: 'com.google.gms.google-services'
* What went wrong:
Возникла проблема при настройке root проекта «Автосалон».
Не удалось разрешить все артефакты для конфигурации ": путь к классам". Не удалось разрешить com.google.gms: google-services: 4.3.3. Требуется: проектом: Не удалось разрешить com.google.gms: google-services: 4.3.3. Не удалось получить ресурс "https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom". Не удалось получить 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'. Подключиться к 10.147.1.1:3128 [/10.147.1.1] не удалось: время ожидания подключения истекло: подключение не удалось разрешить com.google.gms: google-services: 4.3.3. Не удалось получить ресурс "https://jcenter.bintray.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom". Не удалось получить 'https://jcenter.bintray.com/com/google/gms/google-services/4.3.3/google-services-4.3.3.pom'. Подключиться к 10.147.1.1:3128 [/10.147.1.1] не удалось: время ожидания подключения истекло: connect
Попробуйте: запустить с параметром --stacktrace, чтобы получить трассировку стека. Запустите с параметром --info или --debug, чтобы получить больше результатов журнала. Запустите с --scan, чтобы получить полную информацию.
Получите дополнительную помощь по телефону https://help.gradle.org
СБОЙ СБОЙ в 2 м 12 с ОШИБКА: Превышено время ожидания подключения: подключение
Добавьте репозиторий google maven в свой проект, добавив google() в файл build.gradle в папке root вашего проекта (не в подпапках для модулей).
google()
build.gradle
Он должен тогда посмотрите так:
buildscript { repositories { google() jcenter() } ... }