question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/kotcrab/vis/ui/VisUI (only android)

See original GitHub issue

I have this issue. On desktop it is working, on android he is runtime crashing.

It happens on line VisUI.load();

E/AndroidRuntime: FATAL EXCEPTION: GLThread 21118 Process: com.lusche, PID: 5448 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/kotcrab/vis/ui/VisUI; at com.lusche.screens.BaseGame.create(BaseGame.java:118) at com.lusche.screens.BaseApp.create(BaseApp.java:64) at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311) at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1520) at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1248) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.kotcrab.vis.ui.VisUI" on path: DexPathList[[zip file "/data/app/com.lusche-2/base.apk", zip file "/data/app/com.lusche-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.lusche-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.lusche-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at com.lusche.screens.BaseGame.create(BaseGame.java:118)  at com.lusche.screens.BaseApp.create(BaseApp.java:64)  at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:311)  at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1520)  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1248)  Suppressed: java.lang.ClassNotFoundException: com.kotcrab.vis.ui.VisUI at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 6 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

build.gradle (application level):

allprojects { apply plugin: “eclipse” apply plugin: “idea”

version = '1.0'
ext {
    visuiVersion = '1.3.0'
}

}

project(“:core”) { apply plugin: “java”

dependencies {
    ...
    compile "com.kotcrab.vis:vis-ui:$visuiVersion"
    ...
}

}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
czyzbycommented, Feb 7, 2022

@bartekpacia Try changing your dependencies from implementation to api in your build.gradle files.

Hi @czyzby, thanks for the response and for the library 😃

@kotcrab is the author of the library, I’m just helping with the maintenance. 😃

0reactions
bartekpaciacommented, Feb 10, 2022

@czyzby Thanks! Replacing

implementation "com.kotcrab.vis:vis-ui:$visuiVersion"

with

api "com.kotcrab.vis:vis-ui:$visuiVersion"

for project(":core") did help… and now I’m getting a different error java.lang.NoClassDefFoundError: com/badlogic/gdx/graphics/g2d/freetype/FreeTypeFontGenerator 😃

But it’s unrelated to VisUI. When I deal with it I’ll update this comment in case anybody is in the same boat.

And regarding the authorship… so thanks for your mainteneance and help 😃

update: I fixed the second error as well and was able to run the game on my iPhone 😃 Here’s the link

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed resolution of: Landroid/support/v4/os/BuildCompat ...
NoClassDefFoundError in Java comes when Java Virtual Machine is not able to find a particular class at runtime which was available at compile...
Read more >
java.lang.NoClassDefFoundError: Failed resolution ... - GitHub
Describe the bug Below exception is thrown when I init the trust kit for android using below line TrustKit.
Read more >
java.lang.NoClassDefFoundError: Failed resolution of: Lcs ...
i compiled my extension but java.lang.NoClassDefFoundError: Failed resolution of: Lcs/min2phase/Search; is the error i got in app ...
Read more >
Android Library project throws java.lang.NoClassDefFoundError
NoClassDefFoundError: Failed resolution of: Lrx/Observer;. Caused by: java.lang.ClassNotFoundException: Didn't find class "rx.Observer" on path: DexPathList.
Read more >
Solved: java.lang.NoClassDefFoundError: Failed resolution
Solved: Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found