Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6779385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:22:44+00:00 2026-05-26T16:22:44+00:00

I am facing with a wierd situation where the class is definitely on the

  • 0

I am facing with a wierd situation where the class is definitely on the classpath of my android app but I keep getting NoClassDefFoundError exceptions.

I have checked that the class indeed exists through this code snippet:

try{
  Field dexField = PathClassLoader.class.getDeclaredField("mDexs");
  dexField.setAccessible(true);

  PathClassLoader classLoader =
   (PathClassLoader)Thread.currentThread().getContextClassLoader();
  Log.d("OUT", "Class loader" + classLoader.getClass().getName());

  DexFile[] dexs = (DexFile[]) dexField.get(classLoader);

  Log.d("OUT", "Enumerating");
  for (DexFile dex : dexs) {
    Enumeration<String> entries = dex.entries();
    while (entries.hasMoreElements()) {
     // (3) Each entry is a class name, like "foo.bar.MyClass"
     String entry = entries.nextElement();
     Log.d("OUT", "Entry: " + entry);
    }
  }
 }catch(Throwable e){
   Log.e("OUT", e.getMessage(), e);
 }
 // Here I reference to the problematic class

When running the app on a device the log does print the class name, and throws the NoClassDefFoundError error upon accessing to it.

I’m lost here.

Any advice? I’d be very grateful. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:22:45+00:00Added an answer on May 26, 2026 at 4:22 pm

    You need to understand that, at least in canonical Java, “NoClassDefFoundError” does not mean that the named .class file could not be found in the classpath. Rather, after it was located some problem prevented the class from being loaded.

    Two common reasons for this are a naming problem (the class in the wrong location in the classpath structure, relative to its internally declared package name, or simply misnamed), or a problem loading some other class that’s needed to perform validation of the named class. Occasionally the problem is due to an exception in the static initializer of the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing this wierd situation with GWT where styles are not picked up
I have a public facing website that has been receiving a number of SQL
I am facing a weird problem I have defined I a structure in a
I am facing a weird problem. I have got a file called in which
I am facing is weird problem. I have an input field on my page
I've used jQuery for some months with good results, but today I'm facing something
I am facing a weird situation, I am developing an asp.net website, and I
We are facing a very weird situation using Visual Studio 2005: There is a
I have been facing a weird issue in a piece of code. void app_ErrDesc(char
I am facing a wierd issue regarding in URL generation in Playframework. Here is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.