NoClassDefFoundError
wkedong opened this issue · 6 comments
wkedong commented
java.lang.NoClassDefFoundError:com.werb.pickphotoview.adapter.GridImageViewHolder
werbhelius commented
那个版本?最新的吗?
riyanirawan007 commented
I got a same error in lastest version 0.4.6, here the logcat
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/werb/library/MoreViewHolder;
at com.werb.pickphotoview.PickPhotoActivity.<init>(PickPhotoActivity.kt:35)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2616)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Caused by: java.lang.ClassNotFoundException: com.werb.library.MoreViewHolder
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.werb.pickphotoview.PickPhotoActivity.<init>(PickPhotoActivity.kt:35)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2616)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlinx/android/extensions/LayoutContainer;
at com.werb.pickphotoview.PickPhotoActivity.<init>(PickPhotoActivity.kt:35)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2616)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Caused by: java.lang.ClassNotFoundException: Didn't find class "kotlinx.android.extensions.LayoutContainer" on path: DexPathList[[zip file "/data/app/com.sahabatjasa.app-2/base.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.sahabatjasa.app-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.sahabatjasa.app-2/lib/arm64, /system/lib64, /vendor/lib64]]
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.werb.pickphotoview.PickPhotoActivity.<init>(PickPhotoActivity.kt:35)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2616)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
This is the java code for initiate, i was initiating with a fragment not an activity
if(getActivity()!=null)
{
new PickPhotoView.Builder(getActivity())
.setPickPhotoSize(1) // select image size
.setClickSelectable(true) // click one image immediately close and return image
.setShowCamera(true) // is show camera
.setSpanCount(3) // span count
.setLightStatusBar(true) // lightStatusBar used in Android M or higher
.setStatusBarColor(R.color.colorPrimaryDark) // statusBar color
.setToolbarColor(R.color.place_autocomplete_prediction_primary_text) // toolbar color
.setToolbarTextColor(R.color.white) // toolbar text color
.setSelectIconColor(R.color.white) // select icon color
.setShowGif(false) // is show gif
.start();
}
Any suggestions for solved this problem ?
YarenTang commented
I got a same error in lastest version 0.4.6
java.lang.NoClassDefFoundError: com.werb.pickphotoview.adapter.GridImageViewHolder
at com.werb.pickphotoview.ui.GridFragment.initView(GridFragment.kt:71)
at com.werb.pickphotoview.ui.GridFragment.onViewCreated(GridFragment.kt:56)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1432)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1752)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:792)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2595)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2382)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3255)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3205)
at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:195)
at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:597)
at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:177)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
khawarraza-netsoltech commented
Same here and nothing from the library creator.
minseok-kr commented
Same in version 0.4.4.
werbhelius commented
check new version v0.4.8