NoClassDefFoundError (ClassNotFoundException)
saantiaguilera opened this issue · 4 comments
Hi ! Im trying to use it and Im getting that the class cant be found ! D:
Any idea why that could happen ?
Crash is:
--------- beginning of crash
04-14 22:31:48.091 3990-3990/com.example.santiago.kotlintests E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.santiago.kotlintests, PID: 3990
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/commit451/nativestackblur/NativeStackBlur;
at com.example.santiago.kotlintests.queue_list.recycler.view.TaskView$setBlur$1.run(TaskView.kt:52)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.commit451.nativestackblur.NativeStackBlur" on path: DexPathList[[dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-support-annotations-23.3.0_7cf40520635b2ad99fd3fefb5d3477d8777c72a0-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-kotlin-stdlib-1.0.1-2_6a91ce7f088f9cd8f3861b88d402d1856d279b4a-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-kotlin-runtime-1.0.1-2_9a342581d884ac88eb3304de2a0d4319d584bb44-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-internal_impl-23.3.0_389440997ca5e5676aa3ebde4da5aea948ae4b17-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-com.fivehundredpx-blurringview-1.0.0_d998bad930c4586a99fc35c0672ec39347ae5379-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-com.android.support-support-vector-drawable-23.3.0_00c135594037684ea1b2d47b0a65b54a048ea327-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-com.android.support-support-v4-23.3.0_9dbe9d53b32e854dd0502ee38cb7a1a171a64561-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-com.android.support-recyclerview-v7-23.3.0_31aa1fd1958b3ab9e6e45f5df4d6728e54a6d758-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-com.android.support-appcompat-v7-23.3.0_0d855a9b0fa2d26daf46e0bbab7b828a586bd873-classes.dex", dex file "/data/data/com.example.santiago.kotlintests/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-23.3.0_9359ec0272ac749dec746e67694706c4b5d9cd02-classes.dex"],nativeLibraryDirectories=[/data/app/com.example.santiago.kotlintests-2/lib/arm, /vendor/lib, /system/lib, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loa
Code (Im using kotlin):
fun setBlur(blur: Boolean) {
if (blur) {
post {
var bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
draw(Canvas(bitmap));
blurImage.visibility = VISIBLE
blurImage.setImageBitmap(NativeStackBlur.process(bitmap, 15));
}
} else blurImage.visibility = GONE
active = !blur
}
I created a branch for this issue, so feel free to check the entire code if needed, Ive got no idea why I cant find a reference for the class (when I can see perfectly all your lib from my android-studio)
https://github.com/saantiaguilera/android-kotlin-test-stuff/blob/01-sa-blur_issue/app/src/main/java/com/example/santiago/kotlintests/queue_list/recycler/view/TaskView.kt
Hey there, this is a weird issue indeed. Have you tried this on multiple devices? It could possibly be an architecture issue.
Did you ever get this sorted out @saantiaguilera ?
No ! I end up using the RenderScript and for lower api versions I did something very similar to what this lib does.
No idea why it wasnt finding them, it was probably something related to my computer tho
Hmm, okay, well I am going to go ahead and close it out. Hopefully it will not continue to arise