Clint Landry Clint Landry -4 years ago 191
Android Question

Java.Lang.ClassNotFoundException: Didn't find class "" on path: DexPathList

I created a binding for a .jar and it works fine as in a test branch but when moving this same .jar binding to our production branch the following error is thrown.

Java.Lang.ClassNotFoundException: Didn't find class ""
on path: DexPathList[[zip file "/data/app/com.mycomany.myappname-1.apk"],
/vendor/lib, /system/lib]]

I found

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

but I do not see anywhere in Visual Studio or Xamarin Studio to select Java Build Path and follow those instructions.

Answer Source

You need to ensure you Embed your Binding Jar so it'll embed into the .apk. You can find a similar error on our Troubleshooting page:

java.lang.NoClassDefFoundError is thrown in the packaging step.

Possible Causes:

The most likely reason for this error is that a mandatory Java library needs to be added to the application project (.csproj). .JAR files are not automatically resolved. A Java library binding is not always generated against a user assembly that does not exist in the target device or emulator (such as Google Maps maps.jar). This is not the case for Android Library project support, as the library .JAR is embedded in the library dll. For example:

You can find a small note on Embedded vs Non-Embedded here:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download