My other projects are working fine as expected, but my one project is stuck on downloading maven-metadata . After restoring the android studio default settings I am facing this issue. Is there any possible reason for this. I tried various solution in the SF but none are helping.
I am using Android studio 4.1
Project level
buildscript {
ext.kotlin_version = '1.4.21'
ext.serialization_version = '1.0-M1-1.4.0-rc'
repositories {
google()
jcenter()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0'
classpath 'com.google.gms:google-services:4.3.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
// Add the Esri public Bintray Maven repository
maven { url 'https://maven.google.com/' }
maven { url 'https://esri.jfrog.io/artifactory/arcgis' }
}
}
ext {
// Sdk and tools
minSdkVersion = 26
targetSdkVersion = 29
compileSdkVersion = 29
buildToolsVersion = '29.0.2'
// App dependencies
daggerVersion = '2.30.1'
retrofitVersion = '2.9.0'
lifeCycleVersion = '2.2.0'
roomVersion = "2.2.5"
mlKitVersion = "24.0.3"
//Test dependencies
junitVersion = '4.13.1'
mockitoVersion = '3.6.28'
powerMockito = '1.6.2'
espressoVersion = '3.3.0'
leakCanaryVersion = '2.5'
googleMapVersion = '17.1.0'
permissionVersion = '4.1.0'
esriMapVersion = '100.10.0'
workManagerVersion = '2.3.3'
slf4jVersion = '1.7.30'
}
ext.libraries = [
appCompact : "androidx.appcompat:appcompat:1.2.0",
constraintLayout : "androidx.constraintlayout:constraintlayout:2.0.4",
materialComponents : "com.google.android.material:material:1.3.0-alpha04",
recyclerView : "androidx.recyclerview:recyclerview:1.2.0-beta01",
mlKit : "com.google.firebase:firebase-ml-vision:$mlKitVersion",
lifeCycleRuntime : "androidx.lifecycle:lifecycle-runtime:$lifeCycleVersion",
lifeCycleRuntimeExtensions: "androidx.lifecycle:lifecycle-extensions:$lifeCycleVersion",
lifeCycleCompiler : "androidx.lifecycle:lifecycle-compiler:$lifeCycleVersion",
firebaseCloudMessaging : "com.google.firebase:firebase-messaging:21.0.0",
firebseAnalytic : "com.google.firebase:firebase-analytics:18.0.0",
firebaseCrashlytics : "com.google.firebase:firebase-crashlytics:17.3.0",
firebasePerf : "com.google.firebase:firebase-perf:19.0.10",
roomRuntime : "androidx.room:room-runtime:$roomVersion",
roomCompiler : "androidx.room:room-compiler:$roomVersion",
roomRxJava2 : "androidx.room:room-rxjava2:$roomVersion",
rxJava : "io.reactivex.rxjava2:rxjava:2.2.20",
rxAndroid : "io.reactivex.rxjava2:rxandroid:2.1.1",
rxKotlin : "io.reactivex.rxjava2:rxkotlin:2.4.0",
okhttpLogging : "com.squareup.okhttp3:logging-interceptor:4.9.0",
retrofitConverter : "com.squareup.retrofit2:converter-gson:$retrofitVersion",
retrofit : "com.squareup.retrofit2:retrofit:$retrofitVersion",
retrofitRxJava2Adapter : "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion",
dagger : "com.google.dagger:dagger:$daggerVersion",
daggerAndroid : "com.google.dagger:dagger-android:$daggerVersion",
daggerAndroidSupport : "com.google.dagger:dagger-android-support:$daggerVersion",
daggerCompiler : "com.google.dagger:dagger-compiler:$daggerVersion",
daggerAndroidProcessor : "com.google.dagger:dagger-android-processor:$daggerVersion",
multidex : 'androidx.multidex:multidex:2.0.1',
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version",
//Libraries for Tests
junit : "junit:junit:$junitVersion",
expressoCore : "androidx.test.espresso:espresso-core:$espressoVersion",
mockito : "org.mockito:mockito-core:$mockitoVersion",
mockitoKotlin : "com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0",
//Libraries for development
leakCanary : "com.squareup.leakcanary:leakcanary-android:$leakCanaryVersion",
leakCanaryNoop : "com.squareup.leakcanary:leakcanary-android-no-op:1.6.3",
//Library for Font
FontSupportLibrary : "com.android.support:support-compat:$buildToolsVersion",
//Library for Google maps
googleMapLocation : "com.google.android.gms:play-services-location:$googleMapVersion",
//Permission(PermissionsDispatcher)
permission : "com.github.hotchemi:permissionsdispatcher:$permissionVersion",
permissionProcessor : "com.github.hotchemi:permissionsdispatcher-processor:$permissionVersion",
//Library for ESRI maps
esriMap : "com.esri.arcgisruntime:arcgis-android:$esriMapVersion",
//Image loading
imageLoader : "com.github.bumptech.glide:glide:4.11.0",
imageLoaderCompiler : "com.github.bumptech.glide:compiler:4.11.0",
//Logging
kotlinLogger : "io.github.microutils:kotlin-logging:2.0.3",
slf4jAPI : "org.slf4j:slf4j-api:$slf4jVersion",
slf4jAPINOP : "org.slf4j:slf4j-nop:$slf4jVersion",
logbackAndroid : "com.github.tony19:logback-android:2.0.0",
//Tools
tooLargeTool : 'com.gu.android:toolargetool:0.2.1@aar',
//Work-Manager
workManager : "android.arch.work:work-runtime-ktx:$workManagerVersion",
//Shimmer
shimmer : "com.facebook.shimmer:shimmer:0.5.0",
//Biometric
biometric : "androidx.biometric:biometric:1.0.1"
]
task clean(type: Delete) {
delete rootProject.buildDir
}
appLevel
buildscript {
repositories {
// ...
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
// ...
classpath 'com.github.triplet.gradle:play-publisher:2.2.0-SNAPSHOT'
}
}
plugins {
id 'com.android.application'
id 'com.github.triplet.play' version '2.1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlinx-serialization'
apply plugin: 'com.google.firebase.crashlytics'
android {
ext {
APP_NAME = "@string/app_name"
APP_NAME_DEV = "@string/app_name_dev"
APP_NAME_AUTOMATION = "@string/app_name_automation"
}
compileSdkVersion rootProject.compileSdkVersion
defaultConfig {
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
multiDexEnabled true
versionCode project.hasProperty("versionCode") ? project.versionCode.toInteger() : 1
versionName project.hasProperty("versionName") ? project.versionName : "2021.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
}
signingConfigs {
release {
storeFile file('xyz')
storePassword 'treadstone'
keyPassword 'treadstone'
}
}
buildTypes {
debug {
minifyEnabled false
shrinkResources false
zipAlignEnabled false
}
dev {
////** Uncomment to test obfuscated dev release buildd
// minifyEnabled true
// shrinkResources true
// zipAlignEnabled true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
applicationIdSuffix ".dev"
manifestPlaceholders = [applicationLabel: APP_NAME_DEV]
buildConfigField 'int', 'locationAccuracy', '20'
buildConfigField 'Boolean', 'sqliteEncryptionEnabled', 'false'
signingConfig signingConfigs.release
ndk {
abiFilters "armeabi-v7a", "x86", 'arm64-v8a'
}
}
automation {
minifyEnabled false
debuggable true
applicationIdSuffix ".automation"
manifestPlaceholders = [applicationLabel: APP_NAME_AUTOMATION]
buildConfigField 'int', 'locationAccuracy', '20'
buildConfigField 'Boolean', 'sqliteEncryptionEnabled', 'false'
signingConfig signingConfigs.release
ndk {
abiFilters "armeabi-v7a", "x86", 'arm64-v8a'
}
}
release {//TODO: Rename to 'prod'
debuggable false
minifyEnabled true
shrinkResources true
zipAlignEnabled true
manifestPlaceholders = [applicationLabel: APP_NAME]
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField 'int', 'locationAccuracy', '50'
buildConfigField 'Boolean', 'sqliteEncryptionEnabled', 'true'
signingConfig signingConfigs.release
ndk {
abiFilters 'arm64-v8a'
}
}
}
flavorDimensions "version"
productFlavors {
crewforce {
dimension "version"
applicationIdSuffix ".crewforce"
buildConfigField "String", "APPLICATION_TYPE", '"{cd521b8f-c655-42f0-b7f6-8da8423fa166}"'
buildConfigField "String", "DEFAULT_ROLE", '"Firefighter"'
buildConfigField "String", "GeoId", '"2"'
}
shieldforce {
dimension "version"
applicationIdSuffix ".shieldforce"
buildConfigField "String", "APPLICATION_TYPE", '"{b8850ba1-a012-41d1-b700-55ca4e47fe2b}"'
buildConfigField "String", "DEFAULT_ROLE", '"Patrol Officer"'
buildConfigField "String", "GeoId", '"1"'
}
}
applicationVariants.all { variant ->
variant.outputs.all {
def versionName = variant.versionName
def versionCode = variant.versionCode
def variantName = variant.name // CrewForceRelease or ShieldForceRelease
outputFileName = variantName + '_' + versionName + '_' + versionCode + '.apk'
}
}
variantFilter { variant ->
def exclude = variant.name in [
'crewforceDebug',
'shieldforceDebug'
]
variant.setIgnore(exclude)
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
lintOptions {
disable 'InvalidPackage'
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
repositories {
mavenCentral()
maven { url "https://kotlin.bintray.com/kotlinx" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven { url 'https://dl.bintray.com/guardian/android' }
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//Android SDK libraries & Kotlin
implementation libraries.constraintLayout
implementation libraries.appCompact
implementation libraries.materialComponents
implementation libraries.recyclerView
implementation libraries.kotlinStdLib
//Firebase
implementation libraries.mlKit
implementation libraries.firebaseCloudMessaging
implementation libraries.firebseAnalytic
implementation libraries.firebaseCrashlytics
implementation libraries.firebasePerf
//Lifecycle Components
implementation libraries.lifeCycleRuntime
implementation libraries.lifeCycleRuntimeExtensions
kapt libraries.lifeCycleCompiler
//Room Database
implementation libraries.roomRuntime
kapt libraries.roomCompiler
implementation libraries.roomRxJava2
//Retrofit
implementation libraries.okhttpLogging
implementation libraries.retrofitConverter
implementation libraries.retrofit
implementation libraries.retrofitRxJava2Adapter
//Dagger
implementation libraries.dagger
implementation libraries.daggerAndroid
implementation libraries.daggerAndroidSupport
kapt libraries.daggerCompiler
kapt libraries.daggerAndroidProcessor
//RxJava
implementation libraries.rxJava
implementation libraries.rxAndroid
implementation libraries.rxKotlin
implementation libraries.multidex
//Test
testImplementation libraries.mockito
testImplementation libraries.junit
testImplementation(libraries.mockitoKotlin) {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
}
androidTestImplementation libraries.expressoCore
//Development
debugImplementation libraries.leakCanary
releaseImplementation libraries.leakCanaryNoop
devImplementation libraries.leakCanary
automationImplementation libraries.leakCanaryNoop
//Downloadable Font
implementation libraries.FontSupportLibrary
//Google Map
implementation libraries.googleMapLocation
//RuntimePermission(PermissionsDispatcher)
implementation libraries.permission
kapt libraries.permissionProcessor
// ESRI Map
implementation libraries.esriMap
//Turf Routing
implementation 'com.mapbox.mapboxsdk:mapbox-sdk-turf:5.4.1'
//JTS Routing
implementation 'org.locationtech.jts:jts-core:1.17.1'
//Work Manager
implementation libraries.workManager
//SQLCipher
implementation 'net.zetetic:android-database-sqlcipher:4.4.2@aar'
implementation 'com.commonsware.cwac:saferoom.x:1.0.0'
//Logging
implementation libraries.kotlinLogger
implementation libraries.slf4jAPI
testImplementation libraries.slf4jAPINOP
implementation libraries.logbackAndroid
//Image Loader
implementation libraries.imageLoader
kapt libraries.imageLoaderCompiler
implementation libraries.tooLargeTool
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:$serialization_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2-native-mt'
implementation 'org.codehaus.jettison:jettison:1.1'
implementation('com.thoughtworks.xstream:xstream:1.4.14') {
exclude group: 'xmlpull', module: 'xmlpull'
}
implementation project(':dl-parser')
//Shimmer
implementation libraries.shimmer
//Biometric
implementation libraries.biometric
play {
track = "internal"
serviceAccountCredentials = file("api-7648918347200791448-85734-0a7e30fc1319.json")
resolutionStrategy = "auto"
outputProcessor {
versionNameOverride = "$versionNameOverride.$versionCode"
}
}
}
apply plugin: 'com.google.gms.google-services'