'Getting the warning message 'Failed to resolve: com.symbol:emdk:9.1.1' on android studio

I'm currently trying to develop a basic barcode scanning app for a Zebra device. It's a TC57. The problem is, imports won't work for me in java. And whenever I try and sync my build.gradle file issues appear. I've included the relevant code below, is there anything I need to fix does anybody know why this is happening?

Thanks!

app/Build.Gradle

    plugins {
        id 'com.android.application'
        id 'org.jetbrains.kotlin.android'
    }
    
    android {
        compileSdk 32
    
        defaultConfig {
            applicationId "com.example.scanbarcode"
            minSdk 21
            targetSdk 32
            versionCode 1
            versionName "1.0"
    
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
    
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_11
            targetCompatibility JavaVersion.VERSION_11
        }
        kotlinOptions {
            jvmTarget = '1.8'
        }
    }

dependencies {
    compileOnly 'com.symbol:emdk:9.1.1'
    implementation 'androidx.core:core-ktx:1.7.0'
    releaseImplementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}

project/build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
        repositories {
            google()
            mavenCentral()
            maven { url 'https://maven.google.com' }
            maven { url 'https://maven.fabric.io/public' }
            maven { url "https://zebratech.jfrog.io/artifactory/EMDK-Android/" }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:7.3.0-alpha09'
        }
    }
    plugins {
        id 'com.android.application' version '7.1.3' apply false
        id 'com.android.library' version '7.1.3' apply false
        id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
    }
    
    allprojects {
        repositories {
            maven { url 'https://jitpack.io' }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }

androidmanifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.scanbarcode">
    <uses-permission android:name="com.symbol.emdk.permission.EMDK" />
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.ScanBarcode">
        <uses-library android:name="com.symbol.emdk" android:required="false"/>
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


Solution 1:[1]

Symbol is distributing their artifacts via JCenter, a service of Bintray. In 2021 Bintray went through a period where they threatened to shut down JCenter, so developers abandoned it in droves. Among those changes was that Google removed jcenter() from the standard roster of artifact repositories to search in.

Long term, Symbol should do something else for distributing its artifacts.

Short term, you will need to add jcenter() back to your list of artifact repositories in Gradle.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 CommonsWare