I have an Android app that is failing to build in Android Studio. The app has been around for several years now, and I’ve had no issues in the past with building or running it. A few weeks ago, I upgraded to a newer laptop and installed everything fresh, including Android Studio Kohala 2024.1.2. Now for some reason, when I try to build the app, it fails and states
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.microsoft.azure:azure-notifications-handler:1.0.1.
In the build log it shows over and over how it tried to resolve the dependency and failed.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/microsoft/azure/azure-notifications-handler/1.0.1/azure-notifications-handler-1.0.1.pom
- https://repo.maven.apache.org/maven2/com/microsoft/azure/azure-notifications-handler/1.0.1/azure-notifications-handler-1.0.1.pom
- https://jcenter.bintray.com/com/microsoft/azure/azure-notifications-handler/1.0.1/azure-notifications-handler-1.0.1.pom
- https://jitpack.io/com/microsoft/azure/azure-notifications-handler/1.0.1/azure-notifications-handler-1.0.1.pom
Required by:
project :app
What is truly strange though is a fellow developer who is running the same version of Android Studio and Windows 11 is able to build it without any issue. I’ve gone through and compared settings, build.gradle files, etc., and all match – so I’m 100% stumped.
Here is what I’ve got in the gradle files. Does anyone know what I can try to resolve this?
build.gradle (app level)
apply plugin: 'com.android.application'
android {
useLibrary 'org.apache.http.legacy'
namespace 'XXX-MYAPPID-XXX'
defaultConfig {
applicationId "XXX-MYAPPID-XXX"
minSdkVersion 26
compileSdk 34
targetSdkVersion 34
versionCode 400
versionName = "4.0"
multiDexEnabled true
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles 'proguard-project.txt'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.firebase:firebase-core:21.1.1'
implementation 'com.google.android.gms:play-services-location:21.3.0'
implementation 'com.google.android.gms:play-services-maps:19.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.mediarouter:mediarouter:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation "com.google.android.gms:play-services-gcm:17.0.0"
implementation 'com.microsoft.azure:notification-hubs-android-sdk:2.0.0'
implementation 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
implementation 'me.leolin:ShortcutBadger:1.1.4@aar'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.3.7'
implementation 'com.wang.avi:library:2.1.3'
implementation("com.github.bumptech.glide:glide:4.11.0") {
exclude group: 'com.android.support'
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
annotationProcessor 'androidx.annotation:annotation:1.8.0'
implementation 'com.google.firebase:firebase-messaging:24.0.1'
implementation 'com.vanniktech:android-image-cropper:4.3.3'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.github.gcacace:signature-pad:1.2.1'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation "androidx.work:work-runtime:2.9.1"
implementation 'androidx.preference:preference:1.2.1'
}
repositories {
maven {
url "https://jcenter.bintray.com/"
name "jcenter"
}
maven { url "https://jitpack.io" }
mavenCentral()
}
apply plugin: 'com.google.gms.google-services'
build.gradle (project level)
buildscript {
repositories {
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.2'
classpath 'com.google.gms:google-services:4.4.2'
} }
allprojects {
repositories {
google()
mavenCentral()
} }
tasks.register('clean', Delete) {
delete rootProject.layout.buildDirectory }
3