- ClassNotFoundException on path DexPathList #387
- Comments
- lognaturel commented Feb 6, 2017 •
- lognaturel commented Feb 6, 2017
- shobhitagarwal1612 commented Feb 6, 2017
- lognaturel commented Feb 6, 2017
- shobhitagarwal1612 commented Feb 6, 2017
- shobhitagarwal1612 commented Feb 6, 2017
- lognaturel commented Feb 7, 2017 •
- lognaturel commented Feb 7, 2017
- srsudar commented Feb 7, 2017 •
- srsudar commented Feb 7, 2017
- lognaturel commented Feb 7, 2017
- shobhitagarwal1612 commented Feb 7, 2017
- lognaturel commented Feb 7, 2017
- shobhitagarwal1612 commented Feb 7, 2017
- shobhitagarwal1612 commented Feb 7, 2017
- shobhitagarwal1612 commented Feb 7, 2017
- mfaragallah commented Jun 8, 2017
- lognaturel commented Jun 8, 2017
- BhavaniBaskaran commented Jan 18, 2018
- sweta01 commented Feb 17, 2018
- kkvarma commented Feb 23, 2018 •
- lognaturel commented Feb 23, 2018
- saurabhtanu commented Feb 24, 2018
- BhagavanReddyByreddy commented Mar 19, 2018
- ma-fouani commented Jul 1, 2018
- wcluigi commented Nov 6, 2019 •
- java.lang.ClassNotFoundException: Didn’t find class on path: dexpathlist — Troubleshooting
- Solution for java.lang.ClassNotFoundException: Didn’t find class on path: dexpathlist
- Prerequisites
- Our solution to the dexpathlist problem
- I got error: Didn’t find class on path DexPathLis. How can I solve it? #6
- Comments
- bigbn commented Feb 27, 2015
- VivekPanyam commented Feb 28, 2015
- bigbn commented Feb 28, 2015
- bigbn commented Mar 1, 2015
- bigbn commented Mar 1, 2015
- VivekPanyam commented Sep 11, 2015
- Goldie13 commented Aug 22, 2016
- yangguanglu commented Apr 26, 2017
- weizhizhanghao commented Jun 22, 2017
ClassNotFoundException on path DexPathList #387
Comments
lognaturel commented Feb 6, 2017 •
Seen from builds 1061, 1063 and 1065 in the Google Play Developer console. It has happened three times each on Android 4.2, 4.4 and 5.1 (so not very frequently). There is a recent user message that says «legal help page» but I don’t know what that means.
This StackOverflow post has some ideas to explore.
The text was updated successfully, but these errors were encountered:
lognaturel commented Feb 6, 2017
@shobhitagarwal1612, this looks like it could be related to the issue you’re running into. Have you been using the emulator or a real phone? Can you try the other to see if it still happens?
shobhitagarwal1612 commented Feb 6, 2017
I am using my Xolo Q700s Plus, (Android 4.4)
I have also tested on RedMi Note 3, Android 6.0)
lognaturel commented Feb 6, 2017
@shobhitagarwal1612 Can you give the emulator a try, too? I’m still not totally sure this is the same issue since it’s not exactly the same stack trace than you’re getting but it would be interesting to know if the emulator works.
shobhitagarwal1612 commented Feb 6, 2017
I’ll try once again using a clean build
shobhitagarwal1612 commented Feb 6, 2017
@lognaturel I used a clean build and reinstalled the apk. Now, the app is running on RedMi Note 3 (Android 6) but throwing the same error on Xolo Q700s plus(Kitkat, Android 4.4). Thanks for the suggestion
lognaturel commented Feb 7, 2017 •
I tried to run on an API 9 emulator which worked a few days ago and now I get INSTALL_FAILED_DEXOPT even after a clean build. No idea if this is related or not. I’ve tried several suggestions from SO with no luck. No problems running on an API 19 (Android 4.4) emulator.
The big recent change related to all this is that MultiDex support was added just a few days ago. This particular issue has been ongoing since build 1061 but not very frequent.
I’ve added a few more pieces of information from the dev console to the original issue.
lognaturel commented Feb 7, 2017
This is @shobhitagarwal1612’s stack trace reported on Slack:
srsudar commented Feb 7, 2017 •
This sounds a lot like a MultiDex issue I saw with a Collect port I was working on. I solved it by adding a call to attachBaseContext in the Application class. See the line here.
Apologies if this discussion is happening against a branch where this is already added. I don’t see it on master. The main fix is this:
edit: Added some much needed context.
srsudar commented Feb 7, 2017
If it does turn out to be this, I should add that this was one of the most annoying bugs I’ve encountered. It was crashing in the field, I had no idea why, and the importance of MultiDex.install is completely under-emphasized in the docs.
The repo I linked to there is a MultiDex version of Collect that I got working on at least as low as 4.4, so if it isn’t this issue there might be something else in the config files or something that is helpful.
lognaturel commented Feb 7, 2017
Thanks for jumping in and sharing your wisdom @srsudar! That all seems like a super promising first direction to explore and it’s certainly completely new to me.
shobhitagarwal1612 commented Feb 7, 2017
lognaturel commented Feb 7, 2017
@shobhitagarwal1612 Do you want to take a first stab at trying those changes and either report back on what you discover or if it fixes your problem, issue a PR? You’re the only one who is able to reproduce this reliably so it would be super helpful!
shobhitagarwal1612 commented Feb 7, 2017
in Collect.java and it worked for me. Thanks @srsudar
shobhitagarwal1612 commented Feb 7, 2017
@lognaturel I will issue a PR making those changes.
shobhitagarwal1612 commented Feb 7, 2017
@lognaturel I have issued the PR #391. Please review
mfaragallah commented Jun 8, 2017
I still have the same issue here ! How can I fix it ?
lognaturel commented Jun 8, 2017
@mfaragallah Please file a new issue with all the information about device version, etc.
BhavaniBaskaran commented Jan 18, 2018
Hi,
Still i have same issue how can solve it ? Already i have used it.
@OverRide
protected void attachBaseContext(Context base) <
super.attachBaseContext(base);
MultiDex.install(this);
>
in this line but app is crash not supported for it. please give some idea.
sweta01 commented Feb 17, 2018
Caused by: java.lang.ClassNotFoundException: Didn’t find class «android.support.v4.math.MathUtils»
kkvarma commented Feb 23, 2018 •
Hi, I am getting below error while integrating reactnative android aar file in another project.
Please help me to solve this problem..
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/demos/helloworld/MyReactActivity;
at com.demos.helloworld.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.ClassNotFoundException: com.demos.helloworld.MyReactActivity
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.demos.helloworld.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/react/modules/core/DefaultHardwareBackBtnHandler;
at com.demos.helloworld.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.lang.ClassNotFoundException: Didn’t find class «com.facebook.react.modules.core.DefaultHardwareBackBtnHandler» on path: DexPathList[[zip file «/data/app/reacttest.prime.com.aarimplementation-1/base.apk»],nativeLibraryDirectories=[/data/app/reacttest.prime.com.aarimplementation-1/lib/x86, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.demos.helloworld.MainActivity.onCreate(MainActivity.java:19)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
lognaturel commented Feb 23, 2018
@kkvarma @sweta01 Those issues don’t seem related to ODK Collect. Please get in touch with the projects you are working with. Good luck!
saurabhtanu commented Feb 24, 2018
I still have the same issue, I an extending MultidexApplication in my app class and I see that the MultidexApplication already calls the Multidex.install() method. However I see this crash only in android versions 6.0 and below
BhagavanReddyByreddy commented Mar 19, 2018
@OverRide
protected void attachBaseContext(Context base) <
super.attachBaseContext(base);
MultiDex.install(this);
>
this worked for me in Application class thanks 🙂
ma-fouani commented Jul 1, 2018
I guess you might have found out what was wrong by now, I ran into the same problem. It turned out when I created my application class, it was not under any package (weird). I only had to move it under the main package: com.mycompany.example
wcluigi commented Nov 6, 2019 •
im also facing this issue
what is weird is its looking for a class that i renamed already and i refractored it the right way but for some reason the error is still pointing to a non-existing class
Edit
My bad lol its still written in the manifest lmao
Источник
java.lang.ClassNotFoundException: Didn’t find class on path: dexpathlist — Troubleshooting
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 project android. After long minutes of renaming the package and fixing errors, we finally start to compile and run 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:
After hours of research on the website and brainstorming we ended up finding a solution that might have solved our problem. The latter, at the time of writing is not yet on the Web or was not visible among the results of the search. 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 offer you in this mini tutorial, first make sure you have 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 error is not automatically detected by android studio until the Programs crash in your phone or emulator. Worse, the search for the package 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.
Источник
I got error: Didn’t find class on path DexPathLis. How can I solve it? #6
Comments
bigbn commented Feb 27, 2015
I think i miss something, but cant make it work. Here is the souces of my wrapper if it can be helpful:
https://github.com/bigbn/PromoStackShell
APK file exist and based on DinamicActivity, original Activity in file described as:
Project was created in AndroidStudio and uses gradle for build;
The text was updated successfully, but these errors were encountered:
VivekPanyam commented Feb 28, 2015
Do you have the main application on GitHub too? Also make sure you have the wrapper set up the same way as the example. Your wrapper’s AndroidManifest doesn’t contain dummy classes. See the sample manifest.
Also your main APK must be in the assets directory of the wrapper. This APK is what is used on first launch.
Hopefully that helps!
bigbn commented Feb 28, 2015
Oh. i dont know what to do. I found that signature check is one of the reasons, because it everytime fails, because i use signed app in not signed wrapper, but anyway problem still the same
bigbn commented Mar 1, 2015
The story continues. Now my activity class found, but compiler say that he cant load a superclass(DynamicActivity i think):
but i still can’t make it work
bigbn commented Mar 1, 2015
I got stuck for several days and could not find the solution.
Could you please let me know the root cause of above error and how to fix
it?
VivekPanyam commented Sep 11, 2015
Based on the errors you’re getting, it looks like there may be an issue with the way you’re building the projects.
Note that the Evolve library should only be included in the main application. It looks like you included the jar in the wrapper application. This may be why there are some dependency issues. Unfortunately, I can’t really be more helpful without looking at both the wrapper and the main project. Feel free to comment on this issue if you have more questions!
Goldie13 commented Aug 22, 2016
Java.Lang.RuntimeException: Unable to instantiate activity ComponentInfo
at — End of managed Java.Lang.ClassNotFoundException stack trace —
at java.lang.ClassNotFoundException: Didn’t find class «com.Android.MyPro.MainActivity» on path: DexPathList[[zip file «/data/app/com.Android.Mercedes-1.apk»],nativeLibraryDirectories=[/data/app-lib/com.Android.MyPro-1, /vendor/lib, /system/lib, /system/lib/arm]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2141)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2273)
at at android.app.ActivityThread.access$800(ActivityThread.java:138)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:149)
at at android.app.ActivityThread.main(ActivityThread.java:5045)
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:515)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at at dalvik.system.NativeStart.main(Native Method)
— End of inner exception stack trace —
at — End of managed Java.Lang.RuntimeException stack trace —
at java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2273)
at at android.app.ActivityThread.access$800(ActivityThread.java:138)
at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1236)
at at android.os.Handler.dispatchMessage(Handler.java:102)
at at android.os.Looper.loop(Looper.java:149)
at at android.app.ActivityThread.main(ActivityThread.java:5045)
at at java.lang.reflect.Method.invokeNative(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:515)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
at at dalvik.system.NativeStart.main(Native Method)
at Caused by: java.lang.ClassNotFoundException: Didn’t find class «com.Android.MyPro.MainActivity» on path: DexPathList[[zip file «/data/app/com.Android.MyPro-1.apk»],nativeLibraryDirectories=[/data/app-lib/com.Android.MyPro-1, /vendor/lib, /system/lib, /system/lib/arm]]
at at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2141)
at . 11 more
I working on Implicit Intent sharing in which I am sharing image from galleey to my demo application.
I am using Xamarin Visual Studio 2013.
Looking forward for your reply.
yangguanglu commented Apr 26, 2017
hello guy,I meet the same question as you.I just delete all the fold named «build» and build it again,then it’s good.
weizhizhanghao commented Jun 22, 2017
step 1:please check your package name and activity name is right?
step2: if no: corrected it , after,if it is still incorrect, go to step3.
step 2: if yes: check your android studio version ,if version is upper than 2.0, then open your android setting,find the Install Run , cancle all the checked button, then, run once again, you will find, you have solved this problem. if the version is less than 2.0, i have no way to solve.
reason: android studio 2.0 and upper version add a new function named fast install, then, it will reserve some infomations, but when you run your project the next time, it doesn’t recognize the change, then it will lead to some bad results.
Источник