How to imnport Symbol emdk?

1.4k Views Asked by At

I created a new android projekt in the latest Android Studio, and I would like to import and use Symbol EMDK package.

Althought I placed into gradle like this: implementation 'com.symbol:emdk:9.1.1', but when I run gradle synchronization I get this warning:

Failed to resolve: com.symbol:emdk:9.1.1
<a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Affected Modules: <a href="openFile:[Project location]/app/build.gradle">app</a> 

In my older project I can import and use this dependency without problem.

For the implementation I used the offical Zebra documents, but I didn't find anything about this.

How can I figure out what is the main problem with this?

build.gradle(Module)

``` 
   plugins {
        id 'com.android.application'
        id 'org.jetbrains.kotlin.android'
        id 'kotlin-kapt'
        id 'kotlin-android'
        id('dagger.hilt.android.plugin')
        id('androidx.navigation.safeargs.kotlin')
        id 'org.jetbrains.kotlin.plugin.serialization'
    }
    
    android {
        compileSdk 32
    
        defaultConfig {
            applicationId "hu.tandofer.android_kresz"
            minSdk 23
            targetSdk 32
            versionCode 1
            versionName "1.0"
    
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
    
        buildTypes {
            debug {
                applicationIdSuffix ".debug"
                ext.enableCrashlytics = false
                ext.alwaysUpdateBuildId = false
                multiDexEnabled true
            }  
        }
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
        kotlinOptions {
            jvmTarget = '1.8'
        }
        buildFeatures {
            viewBinding true
            dataBinding true}}

    dependencies {
        
        //Urovo
        implementation files("libs/platform_sdk_v4.1.0326.jar")
    
        //Zebra
        implementation "com.symbol:emdk:9.1.1" }
    ```
    build.gradle(Project)
1

There are 1 best solutions below

1
On BEST ANSWER

Finally I resolved it, by adding jcenter() to settings.gradle file

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
    }
}