Problem using EMDK for Android getting ClassNotFoundException

V Vedsatx Saddvv 2 years 11 months ago
110 1 0

I'm using the latest release of the Android EMDK with Android Studio version 2.3. 
 
I've imported the com.symbol.emdk.jar file and added it as a dependency to my project.
 
I've added to my manifest.
 
Then when I implement the EMDKListener on my main activity as follows:
 
public class GLinkInstallActivity extends AppCompatActivity implements EMDKListener
 
and then add the implemented methods, I get the ClassNotFoundException when I try to execute the application.  Removing the "implements EMDKListener" will fix the problem, but that defeats the purpose.
 
My build.gradle file is as follows:
 
apply plugin: 'com.android.application'android {
  compileSdkVersion 25   buildToolsVersion "26.0.2"   defaultConfig {
  applicationId "com.zebra.glinkinstall"   minSdkVersion 19   targetSdkVersion 23   versionCode 1   versionName "1.0"   testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"   }
  buildTypes {
  release {
  minifyEnabled false   proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'   }
  }
  productFlavors {
  }
}
 
dependencies {
  compile fileTree(include: ['*.jar'], dir: 'libs')
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  exclude group: 'com.android.support', module: 'support-annotations'   })
  compile 'com.android.support:appcompat-v7:25.3.1'   compile 'com.android.support:support-v4:25.3.1'   testCompile 'junit:junit:4.12'   provided project(':com.symbol.emdk')
}
 
 
Any ideas as to what I'm missing?

Please register or login to post a reply

1 Replies

V Vedsatx Saddvv

Solved my own problem.  Wish the EMDK group would document this in their help files.  In order to include com.symbol.emdk.jar into a project, you need to:

Use "Import Module" to import the jar into your Android Studio Project.
Modify the AndroidManifest.xml for your application to include the permission "

CONTACT
Can’t find what you’re looking for?