java.lang.ClassNotFoundException: Didn't find class on path: dexpathlist - Troubleshooting

Last update March 9, 2023 at 01:25 am

In your android studio IDE you find the java.lang.ClassNotFoundException error: Didn't find class on path: dexpathlist after running your project. The solution in this troubleshooting.

A few hours ago we imported several files from another android project.

After long minutes of renaming packages and fixing bugs, we finally start compiling and running our new project.

When the interface of our application is displayed, an error occurs. In the logcat we find a message similar to the following message:

java.lang.ClassNotFoundException: Didn't find class on path: DexPathList [[zip file "/data/app/name_du_package-***==/base.apk" Cobra,nativeLibraryDirectories=

After hours of research on the web and brainstorming we finally found a solution that could solve our problem.

The latter, at the time of writing, is not yet on the web or was not visible among the search engine results. For the rest, here is the solution

Solution for java.lang.ClassNotFoundException: Didn't find class on path: dexpathlist

Prerequisites

Before applying the solution that we propose to you on this mini tutorial, make sure you have first tried to apply the following actions:

  • Delete the cache via the interface of your Android studio by following the path: File -> Invalidate Caches / Restart -> Invalidate and Restart
  • If the previous one didn't work, try the following: Build -> Clean Project followed by  Build -> Rebuild Project

If despite the previous steps, the same error continues to appear, then you can apply our solution:

Our solution to the dexpathlist problem

To resolve the error java.lang.ClassNotFoundException: Didn't find class on path: dexpathlist we made the following remark:

  • The packages in our file mobile.navigation.xml were wrong. We then corrected the names of the packages to resolve the compilation problem.
  • The solution is to check among your xml files (in the folder layout priority) if there is no error writing the package name.

This kind of errors are not automatically detected by android studio until the program crashes in your phone or emulator. Worse, the package search via android studio did not allow us to find the cause.

If you want to know how we found it, I will say it was instinctively. The kind of thing that makes you open a file for no reason and Pouf, you find the cause of your problem.

Conclusion

You may be interested in The best open source text editors in 2019 et 12 e-commerce to discover when shopping in Togo in 2021

java.lang.ClassNotFoundException: Didn't find class on path: dexpathlist - Troubleshooting

Auteur: Zetaplus

SPONSORED ARTICLES

WHAT IS TEA? What is the difference between tea and herbal tea?

LATEST ARTICLES