title: Android java.lang.NoClassDefFoundError for Async task
body: <p>I have created an Android app, which is working in all Android phones properly that i have tested except one phone (my colleague's Lenovo S90), where it is failing completely and giving below multiple errors "Could not find class" and "seekAndRead: no enough data". Iam not able to find the cause for this errors since these errors are coming only for one phone and apps like whatsapp is working properly on that phone. The same apk was working one day back properly in this phone and now its not. What could be the possible issues?</p>
  
  <pre><code>I/Database: Truncating Tables.. 
  E/TianynDebugSQLite: seekAndRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase]  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Begin
  E/TianynDebugSQLite: seekAndRead: READ[No such file or directory]    fd[60 ], got+prior[    0], offset[      0], time[0], got[    0]
  E/TianynDebugSQLite: seekAndRead: fileSize[0], readyForRead[0], expectRead[100]
  E/TianynDebugSQLite: seekAndRead: no enough data
  E/TianynDebugSQLite: unixRead: err[Success],amt-got[100]
  E/TianynDebugSQLite: unixRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase]  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, End
  E/TianynDebugSQLite: sqlite3PagerReadFileheader SQLITE_IOERR_SHORT_READ -&gt; SQLITE_OK
  E/TianynDebugSQLite: seekAndRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Begin
  E/TianynDebugSQLite: seekAndRead: READ[No such file or directory]    fd[65 ], got+prior[    0], offset[    512], time[0], got[    0]
  E/TianynDebugSQLite: seekAndRead: fileSize[512], readyForRead[0], expectRead[8]
  E/TianynDebugSQLite: seekAndRead: no enough data
  E/TianynDebugSQLite: unixRead: err[Success],amt-got[8]
  E/TianynDebugSQLite: unixRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, End
  E/TianynDebugSQLite: seekAndRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Begin
  E/TianynDebugSQLite: seekAndRead: READ[No such file or directory]    fd[65 ], got+prior[    0], offset[   9216], time[0], got[    0]
  E/TianynDebugSQLite: seekAndRead: fileSize[8720], readyForRead[18446744073709551120], expectRead[8]
  E/TianynDebugSQLite: seekAndRead: no enough data
  E/TianynDebugSQLite: unixRead: err[Success],amt-got[8]
  E/TianynDebugSQLite: unixRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, End
  E/TianynDebugSQLite: seekAndRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Begin
  E/TianynDebugSQLite: seekAndRead: READ[No such file or directory]    fd[65 ], got+prior[    0], offset[   9216], time[0], got[    0]
  E/TianynDebugSQLite: seekAndRead: fileSize[8720], readyForRead[18446744073709551120], expectRead[8]
  E/TianynDebugSQLite: seekAndRead: no enough data
  E/TianynDebugSQLite: unixRead: err[Success],amt-got[8]
  E/TianynDebugSQLite: unixRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, End
  E/TianynDebugSQLite: seekAndRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Begin
  E/TianynDebugSQLite: seekAndRead: READ[No such file or directory]    fd[65 ], got+prior[    0], offset[  25600], time[0], got[    0]
  E/TianynDebugSQLite: seekAndRead: fileSize[25136], readyForRead[18446744073709551152], expectRead[8]
  E/TianynDebugSQLite: seekAndRead: no enough data
  E/TianynDebugSQLite: unixRead: err[Success],amt-got[8]
  E/TianynDebugSQLite: unixRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, End
  E/TianynDebugSQLite: seekAndRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Begin
  E/TianynDebugSQLite: seekAndRead: READ[No such file or directory]    fd[65 ], got+prior[    0], offset[  25600], time[0], got[    0]
  E/TianynDebugSQLite: seekAndRead: fileSize[25136], readyForRead[18446744073709551152], expectRead[8]
  E/TianynDebugSQLite: seekAndRead: no enough data
  E/TianynDebugSQLite: unixRead: err[Success],amt-got[8]
  E/TianynDebugSQLite: unixRead: Path[/data/data/in.omniware.tracknpay_material/databases/omniDatabase-journal]  ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, End
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.PDFRequest_Async', referenced from method in.omniware.tracknpay_material.helper.FileManagement.linktoPDF
  W/dalvikvm: VFY: unable to resolve new-instance 8619 (Lin/omniware/tracknpay_material/request/PDFRequest_Async;) in Lin/omniware/tracknpay_material/helper/FileManagement;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x0036
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.PDFRequest_Async', referenced from method in.omniware.tracknpay_material.helper.FileManagement.linktoPDF
  W/dalvikvm: VFY: unable to resolve new-instance 8619 (Lin/omniware/tracknpay_material/request/PDFRequest_Async;) in Lin/omniware/tracknpay_material/helper/FileManagement;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x005c
  D/dalvikvm: DexOpt: unable to opt direct call 0xee64 at 0x38 in Lin/omniware/tracknpay_material/helper/FileManagement;.linktoPDF
  D/dalvikvm: DexOpt: unable to opt direct call 0xee64 at 0x5e in Lin/omniware/tracknpay_material/helper/FileManagement;.linktoPDF
  W/asset: Looking for non-asset 'res/layout/screen_simple.xml' in '/system/framework/framework-res.apk'
  W/asset: Looking for non-asset 'res/layout-v17/activity_login_register.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/cell_shape_bottom_accent.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/cell_shape_bottom_grey.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/normal_rectangle.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/color/abc_secondary_text_material_light.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/topcurved_rectangle.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/login_button_login_page.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/toprightcurved_rectangle.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/drawable/topleftcurved_rectangle.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  W/asset: Looking for non-asset 'res/anim/linear_interpolator.xml' in '/system/framework/framework-res.apk'
  W/asset: Looking for non-asset 'res/drawable/progress_medium_holo.xml' in '/system/framework/framework-res.apk'
  W/asset: Looking for non-asset 'res/drawable-xhdpi/spinner_48_outer_holo.png' in '/system/framework/framework-res.apk'
  W/asset: Looking for non-asset 'res/drawable-xhdpi/spinner_48_inner_holo.png' in '/system/framework/framework-res.apk'
  W/asset: Looking for non-asset 'res/drawable/invoice_pay_now_button_grey.xml' in '/data/app/in.omniware.tracknpay_material-1.apk'
  D/Login: onStart:
  D/Login: onResume:
  I/Choreographer: Skipped 34 frames!  The application may be doing too much work on its main thread.
  D/ViewRootImpl: loadSystemProperties persistDebugEvent: false roDebugEvent: false
  I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@421c7458 time:9443438
  D/SplashScreen: onStop:
  D/SplashScreen: onDestroy:
  I/Login: iNSIDE Click
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask', referenced from method in.omniware.tracknpay_material.request.AuthenticationRequests.gcmRegistration
  W/dalvikvm: VFY: unable to resolve new-instance 8611 (Lin/omniware/tracknpay_material/request/AuthenticationRequests$MyAsyncTask;) in Lin/omniware/tracknpay_material/request/AuthenticationRequests;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x008a
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask', referenced from method in.omniware.tracknpay_material.request.AuthenticationRequests.logoutUser
  W/dalvikvm: VFY: unable to resolve new-instance 8611 (Lin/omniware/tracknpay_material/request/AuthenticationRequests$MyAsyncTask;) in Lin/omniware/tracknpay_material/request/AuthenticationRequests;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x002a
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask', referenced from method in.omniware.tracknpay_material.request.AuthenticationRequests.requestOTP
  W/dalvikvm: VFY: unable to resolve new-instance 8611 (Lin/omniware/tracknpay_material/request/AuthenticationRequests$MyAsyncTask;) in Lin/omniware/tracknpay_material/request/AuthenticationRequests;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x00c2
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask', referenced from method in.omniware.tracknpay_material.request.AuthenticationRequests.validateOTP
  W/dalvikvm: VFY: unable to resolve new-instance 8611 (Lin/omniware/tracknpay_material/request/AuthenticationRequests$MyAsyncTask;) in Lin/omniware/tracknpay_material/request/AuthenticationRequests;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x0112
  E/dalvikvm: Could not find class 'in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask', referenced from method in.omniware.tracknpay_material.request.AuthenticationRequests.validateUser
  W/dalvikvm: VFY: unable to resolve new-instance 8611 (Lin/omniware/tracknpay_material/request/AuthenticationRequests$MyAsyncTask;) in Lin/omniware/tracknpay_material/request/AuthenticationRequests;
  D/dalvikvm: VFY: replacing opcode 0x22 at 0x003f
  D/dalvikvm: DexOpt: unable to opt direct call 0xee47 at 0x8e in Lin/omniware/tracknpay_material/request/AuthenticationRequests;.gcmRegistration
  D/dalvikvm: DexOpt: unable to opt direct call 0xee47 at 0x2f in Lin/omniware/tracknpay_material/request/AuthenticationRequests;.logoutUser
  D/dalvikvm: DexOpt: unable to opt direct call 0xee47 at 0xc7 in Lin/omniware/tracknpay_material/request/AuthenticationRequests;.requestOTP
  D/dalvikvm: DexOpt: unable to opt direct call 0xee47 at 0x117 in Lin/omniware/tracknpay_material/request/AuthenticationRequests;.validateOTP
  D/dalvikvm: DexOpt: unable to opt direct call 0xee47 at 0x44 in Lin/omniware/tracknpay_material/request/AuthenticationRequests;.validateUser
  D/TelephonyManager: getSimState defaultSimId=0
  D/TelephonyManager: getSimState defaultSimId=0
  D/TelephonyManager: getSimState defaultSimId=0
  I/Database: Row Count=1
  I/AuthenticationRequests: iNSIDE validateUser
  D/AndroidRuntime: Shutting down VM
  W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41c8bd70)
  I/System.out: [socket][0] connection 7e687a56.api.splkmobile.com/54.193.61.76:443;LocalPort=43891(10000)
  I/System.out: [socket][/100.80.22.26:43891] connected
  I/System.out: [socket][1] connection 7e687a56.api.splkmobile.com/54.193.61.76:443;LocalPort=43892(10000)
  I/System.out: [socket][/100.80.22.26:43892] connected
  E/AndroidRuntime: FATAL EXCEPTION: main
        Process: in.omniware.tracknpay_material, PID: 7299
        java.lang.NoClassDefFoundError: in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask
          at in.omniware.tracknpay_material.request.AuthenticationRequests.validateUser(AuthenticationRequests.java:156)
          at in.omniware.tracknpay_material.activity.Login$6.onClick(Login.java:414)
          at android.view.View.performClick(View.java:4460)
          at android.view.View$PerformClick.run(View.java:18649)
          at android.os.Handler.handleCallback(Handler.java:733)
          at android.os.Handler.dispatchMessage(Handler.java:95)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5353)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:855)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:671)
          at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <hr>
  
  <p>Build.gradle(app)</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  repositories {
  maven {
      url "https://mint.splunk.com/gradle/"
  }
  }
  
  android {
  compileSdkVersion 22
  buildToolsVersion "22"
  defaultConfig {
      applicationId "in.omniware.tracknpay_material"
      minSdkVersion 15
      targetSdkVersion 22
      versionCode 10012
      versionName "1.0012"
      multiDexEnabled = true
  }
  buildTypes {
      release {
          minifyEnabled true
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          multiDexKeepFile file('main-dex-list.txt')
      }
  }
  productFlavors {
  }
  packagingOptions {
      exclude 'META-INF/DEPENDENCIES.txt'
      exclude 'META-INF/LICENSE.txt'
      exclude 'META-INF/NOTICE.txt'
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/DEPENDENCIES'
      exclude 'META-INF/notice.txt'
      exclude 'META-INF/license.txt'
      exclude 'META-INF/dependencies.txt'
      exclude 'META-INF/LGPL2.1'
   }
  
  }
  
  dependencies {
  compile 'com.android.support:appcompat-v7:22.2.0'
  compile 'com.android.support:recyclerview-v7:22.2.0'
  compile 'com.android.support:cardview-v7:22.2.0'
  compile 'com.android.support:design:22.2.0'
  
  compile 'com.android.support:multidex:1.0.1'
  
  compile 'org.solovyev.android.views:linear-layout-manager:0.4@aar'
  compile 'com.kobakei:ratethisapp:0.0.3'
  
  compile 'com.getbase:floatingactionbutton:1.9.1'
  compile 'com.github.dbachelder:CreditCardEntry:1.4.7'
  
  compile 'com.journeyapps:zxing-android-embedded:3.0.1@aar'
  compile 'com.google.zxing:core:3.2.0'
  
  compile project(':eBS2')
  compile project(':wibmoSDK')
  compile files('libs/google-play-services.jar')
  compile files('libs/activation.jar')
  compile files('libs/additionnal.jar')
  compile files('libs/mail.jar')
  compile files('libs/paynimo_uat.jar')
  
  compile 'com.fasterxml.jackson.core:jackson-core:2.6.0'
  compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.0'
  compile 'com.fasterxml.jackson.core:jackson-databind:2.6.0'
  
  compile "com.splunk.mint:mint:4.4.0"
  </code></pre>
  
  <p>}</p>
  
  <hr>
  
  <p>Error for Line:</p>
  
  <pre><code>java.lang.NoClassDefFoundError: in.omniware.tracknpay_material.request.AuthenticationRequests$MyAsyncTask
   at in.omniware.tracknpay_material.request.AuthenticationRequests.validateUser(AuthenticationRequests.java:156)
   at in.omniware.tracknpay_material.activity.Login$6.onClick(Login.java:414)
  </code></pre>
  
  <p>is</p>
  
  <pre><code> AsyncTask &lt;String,String,String&gt; myTask = new MyAsyncTask  (context) ;
      try{
          if (Build.VERSION.SDK_INT&gt;= Build.VERSION_CODES.HONEYCOMB)
              myTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR).get();
          else
              myTask.execute().get();
      } catch(Exception e){
          Log.e(TAG, "Ërror in validateUser" + e.toString());
          return e.toString();
      }
  
  
  .
  .
  class MyAsyncTask extends AsyncTask&lt;String,String,String&gt;
  {....}
  </code></pre>
  
  <hr>
  
  <p>Version of Phone:</p>
  
  <pre><code>Android 4.4.4
  </code></pre>
  
  <hr>