Unable to locate class in the dependent libraries or classpath

java.lang.ClassNotFoundException
Javadoc
Thrown when an application tries to load in a class through its string name using:
  • The forName method in class Class.
  • The findSystemClass method in class ClassLoader .
  • The loadClass method in class ClassLoader.

but no definition for the class with the specified name could be found.

As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The "optional exception that was raised while loading the class" that may be provided at construction time and accessed via the {@link #getException()} method is now known as the cause, and may be accessed via the {@link Throwable#getCause()} method, as well as the aforementioned "legacy method." @author unascribed @see java.lang.Class#forName(java.lang.String) @see java.lang.ClassLoader#findSystemClass(java.lang.String) @see java.lang.ClassLoader#loadClass(java.lang.String, boolean) @since JDK1.0

at dalvik.system.BaseDexClassLoader.findClass
(source)
at java.lang.ClassLoader.loadClass
(source)
at java.lang.ClassLoader.loadClass
(source)

Typical Exception Messages

  1. An error occured while executing doInBackground()
  2. An error occurred while executing doInBackground()
  3. <No message>
  4. Unable to start activity ComponentInfo{com.jecelyin.editor.v2/com.jecelyin.editor.v2.ui.MainActivity}: android.view.InflateException: Binary XML file line #23: Error inflating class com.jecelyin.editor.v2.widget.BottomDrawerLayout
  5. Failed resolution of: Landroid/support/v7/appcompat/R$styleable;
  6. Failed resolution of: Landroid/support/v4/util/ArrayMap;
  7. Failed resolution of: Landroid/support/v7/app/AppCompatActivity;
  8. Didn't find class "com.qualcomm.qti.tetherstatsextension.TetherStatsReporting" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
  9. Failed resolution of: Lcom/bumptech/glide/Glide;
  10. Failed resolution of: Lorg/ietf/jgss/Oid;

Origin

ClassLoader.loadClass() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
1 frames hidden
java.lang.ClassLoader.loadClass
2130Web pages

Similar

Specific cases

Solution

Nwabunnia, 11 months ago

A required library class, SdkReceiver, is not loaded. Make sure your SDK classpath is configured correctly in the environment variable or use the -cp or -classpath option if running on the command line, to point to your SDK jar files.

External results for this pattern (1944)

  1. kiddowarevia GitHub3 weeks ago
    Didn't find class "com.onesignal.UpgradeReceiver" on path: DexPathList[[zip file "/data/app/com.kiddoware.kidsplace-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.kiddoware.kidsplace-2, /vendor/lib, /system/lib]]
    Show stack trace
  2. krokofantvia GitHub4 weeks ago
    java.lang.ClassNotFoundException: com.google.android.apps.chrome.utilities.FeatureUtilitiesInternal
    Show stack trace
  3. appsol1via GitHub4 weeks ago
    Failed resolution of: Lcom/sitata/googleplus/TitaniumGooglePlusModule;
    Show stack trace
  4. BarakChamovia GitHub4 weeks ago
    Unable to instantiate receiver com.parse.GcmBroadcastReceiver: java.lang.ClassNotFoundException: Didn't find class "com.parse.GcmBroadcastReceiver" on path: DexPathList[[zip file "/data/app/co.yougoigo.app-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    Show stack trace
  5. yesman99via GitHub4 weeks ago
    Failed resolution of: Landroid/support/v4/view/KeyEventCompat;
    Show stack trace
  6. CtrlAltCutenessvia GitHub4 weeks ago
    Didn't find class "com.example.termuxam.Am" on path: DexPathList[[zip file "/data/data/com.termux/files/usr/libexec/termux-am/am.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    Show stack trace
  7. autonomousappsvia GitHub1 month ago
    Failed resolution of: Lcom/nhaarman/mockito_kotlin/MockitoKt;
    Show stack trace
  8. lakshayjunejavia GitHub1 month ago
    Didn't find class "com.quickblox.messages.services.SubscribeTaskManager" on path: DexPathList[[zip file "/data/app/com.package/base.apk"],nativeLibraryDirectories=[/data/app/com.package-1/lib/arm, /vendor/lib, /system/lib]]
    Show stack trace
  9. ssulei7via GitHub1 month ago
    com.transistorsoft.backgroundfetch.HeadlessJobService
    Show stack trace