Not always but sometimes i see this exception in logcat while running my app
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.classname" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
The app doesn't crash and this com.example.classname
is present in my project.
I am using android studio 2.2 and I am using multidex for our project.
my doubt is this issue is because of multidex.
Any idea about how can i fix this exception?
our build.gradle file is big. i am adding some part of it
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
minSdkVersion 17
targetSdkVersion 22
multiDexEnabled true
......
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
testCompile('org.robolectric:shadows-multidex:3.0') {
exclude group: 'org.robolectric', module: 'robolectric'
}
}
And in custom Application class
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}