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. com.google.android.gms.maps.MapFragment
  2. com.google.android.gms.maps.SupportMapFragment
  3. Didn't find class "com.android.packageinstaller.InstallFlowAnalytics" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
  4. Didn't find class "com.qualcomm.qti.tetherstatsextension.TetherStatsReporting" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
  5. Didn't find class "com.facebook.login.LoginClient$Request" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
  6. Didn't find class "com.google.android.gms.games.multiplayer.realtime.RoomEntity" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
  7. com.google.ads.AdView
  8. Didn't find class "com.google.android.finsky.billing.lightpurchase.PurchaseParams" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
  9. android.support.v4.widget.DrawerLayout
  10. com.google.zxing.client.android.CaptureActivity

Origin

ClassLoader.loadClass() has thrown a ClassNotFoundException

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

Similar

Specific cases

Solution

Nwabunnia, 7 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 (2050)

  1. alnsokolovvia GitHub1 day ago
    Didn't find class "processing.test.sparks.Sparks" on path: DexPathList[[],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    Show stack trace
  2. sr71kvia GitHub3 days ago
    Didn't find class "org.webrtc.MediaCodecVideoDecoder$DecoderOutputBufferInfo" on path: DexPathList[[zip file "/data/app/fi.vtt.nubotest-2.apk"],nativeLibraryDirectories=[/data/app-lib/fi.vtt.nubotest-2, /vendor/lib, /system/lib]]
    Show stack trace
  3. dilanfdovia GitHub3 days ago
    Didn't find class "com.appsflyer.cordova.plugin.AppsFlyerPlugin" on path: DexPathList[[zip file "/data/app/com.cardofjoy.userapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.cardofjoy.userapp-1/lib/arm, /vendor/lib, /system/lib]]
    Show stack trace
  4. woosukvia Stack Overflow4 days ago
    Didn't find class "com.example.calledlibrary.Test" on path: DexPathList[[zip file "/data/data/com.example.callerapp/files/testlibrary.aar"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]]
    Show stack trace
  5. Didn't find class "com.macuverie.mobile.vue.activity.LoginActivityTest4" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.macuverie.mobile.test-2/base.apk", zip file "/data/app/com.macuverie.mobile-1/base.apk"],nativeLibraryDirectories= [/data/app/com.macuverie.mobile.test-2/lib/x86, /data/app/com.macuverie.mobile-1/lib/x86, /system/lib, /vendor/lib]]
    Show stack trace
  6. Lewikyvia Stack Overflow4 days ago
    Didn't find class "com.unity3d.player.ReflectionHelper" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib, /vendor/lib, /system/lib, /vendor/lib]]
    Show stack trace
  7. Didn't find class "com.example.focusz.batterysaverbarremover.Main;" on path: DexPathList[[zip file "/data/app/com.example.focusz.batterysaverbarremover-XjBGBi0EtEf2WhxdLHsJ9g==/base.apk"],nativeLibraryDirectories=[/system/lib64, /vendor/lib64]] 07-16 19:19:32.317 E/Xposed ( 1166):
    Show stack trace
  8. Didn't find class "com.example.it3783application._iSellCrazyStuff" on path: /data/app/com.example.it3783application-1.apk
    Show stack trace
  9. Drunczykvia Google Groups1 week ago
    Didn't find class "com.android.server.extender.TestExtender" on path: DexPathList[[zip file "/system/framework/services.jar", zip file "/system/framework/ethernet-service.jar", zip file "/system/framework/wifi-service.jar"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    Show stack trace
  10. rafaelfukudavia GitHub1 week ago
    Didn't find class "com.pushwoosh.PushFcmIntentService" on path: DexPathList[[zip file "/data/app/com.lesara.app-2/base.apk"],nativeLibraryDirectories=[/data/app/com.lesara.app-2/lib/arm, /data/app/com.lesara.app-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
    Show stack trace