Hi,
I'm having issue getting started with EMDK Android.
I am having problem with enabling EMDK library. I've added the uses-permission tag, but it doesn't seem to be able to find the library. It complained about the library not available.
"Installation failed due to: 'INSTALL_FAILED_MISSING_SHARED_LIBRARY: Reconciliation failed...: Reconcile failed: Package au.com.amesystems.zebraapp requires unavailable shared library com.symbol.emdk; failing!'"
This is my AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <uses-permission android:name="com.symbol.emdk.permission.EMDK" /> <application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules" android:fullBackupContent="@xml/backup_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.ZebraApp" tools:targetApi="33"> <uses-library android:name="com.symbol.emdk"/> <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> <queries> <package android:name="com.symbol.emdk.emdkservice" /> </queries> </manifest>
This is my settings.gradle file.
pluginManagement { repositories { google() mavenCentral() gradlePluginPortal() } } dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() jcenter() maven { url = "https://zebratech.jfrog.io/artifactory/EMDK-Android/" } } } rootProject.name = "ZebraApp" include ':app'
This is my build.gradle file.
plugins { id 'com.android.application' id 'org.jetbrains.kotlin.android' } android { namespace 'au.com.amesystems.zebraapp' compileSdk 33 defaultConfig { applicationId "au.com.amesystems.zebraapp" minSdk 29 targetSdk 33 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_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.10.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' compileOnly 'com.symbol:emdk:11.0.134' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' }
2 Replies
Hi there,
Are you trying to use the EMDK library on a non-Zebra device?
If so, that's not possible.
Hi I got the issue resolved. We have to declare as follows to install in both Zebra and non-zebra devices.
<uses-library android:name="com.symbol.emdk" android:required="false"/>