Android Classnotfoundexception: Didn't Find Class on Path

Didn't find class on path: DexPathList?

I did not find any perfect solution for my problem.But when I upload my apk on google play and download from there,app is working fine.This is the most weird solution I have ever found.

ClassNotFoundException: Didn't find class on path: DexPathList

Update

After a long time, It turned out that it must have anything to do with proguard. I can´t really say what exactly the error causes, but I tried a little bit and that´s what I noticed (that´s in my case with Eclipse IDE):

  • I have to close every tab from the project I want to sign
  • I have to clean the project and after cleaning, do nothing but export the apk
  • making a small change in manifest, save it and undo the change (and save)
  • if there is any class in manifest named with "YourClass" or ".YourClass", change it to "com.yourpackage.yourClass"

That are the four points I have done and then it worked. This looks suspicious, but I think there is a problem with obfuscating. Because without doing these points, I can simply compile my apk and install it from eclipse. For me, there is no obvious reason for this behavior.
Also the package name does work without a change if I only install it from eclipse.
I hope these points can help somebody.

Didn't find class on path: dexpathlist

Same problem here.
What worked for me was adding android-support-v4.jar as a lib and making sure it was checked on Project properties -> Build Path -> Order & export.
It was mentioned here

Android ClassNotFoundException: Didn't find class on path

I don't know for sure what is your package name, but if it is e.gochat do this.

Add package="e.gochat" to manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="e.gochat"
.....
.....
>

On each activity declaration for android:name put a dot before activity name:

<activity
android:name=".MainActivity">
............
</activity>

<activity
android:name=".ChatActivity">

EDIT

After your edited I can see e.gochat is your package name.

Now you only need to remove e.gochat from each activity/provider/receiver name as I said in second part of my answer.

Android will add that for you.

ClassNotFoundException: Didn't find class on path DexPathList on API 19

I finally managed to solve the problem. Turned out that while I had enabled MultiDex in the gradle settings with

defaultConfig {
multiDexEnabled true
...
}

and imported the MultiDex library with

depenencies {
...
compile 'com.android.support:multidex:1.0.1'
...
}

I had forgotten to add it in the AndroidManifest.xml with

<application
...
android:name="android.support.multidex.MultiDexApplication"
...
>
...
</application>

After adding that part it now works on API level 19.



Related Topics



Leave a reply



Submit