Please help java.lang.VerifyError: com/simsilica/lemur/style/StyleLoader

java.lang.VerifyError: com/simsilica/lemur/style/StyleLoader

please help me on this

been struggling with this for a week already.

Do you have more information?

08-11 05:31:22.056 E/ java.lang.VerifyError: com/simsilica/lemur/style/StyleLoader

i used jme3.1, lemur-proto 1.9.1, lemur 1.10.1 .

error comes up when running lemur demos

That part is significant… the android part.

I’m not sure if anyone here has been able to get Groovy working on android… thus the style loader will not work since it uses groovy. Not sure what the issue is since I don’t use android.

just wanted to run those lemur demos… i really want to use lemur. i think it’s great. i have run the gems but the lemur demos not yet. please direct me to link for lemur beginners tutorial. i cant find on google.

The demo uses the built in “glass” style which won’t work unless you have style loader working… which requires groovy. You can make styles without groovy but you have to use more verbose Java code.

Other than the demos/gems/examples, the Lemur wiki has the getting started stuff and docs:

edit: clarified the style loader requirements

i really appreciate your time and help. i hope somebody here can help me on groovy for android. i hope it works fo android too. is there any alternatives? if without groovy, will i be very less productive ? is there any alternative for android? im new in jmonkeyengine… is it really a big deal if i use groovy?

Groovy is only used for Lemur’s style language. The styles can also be defined in Java but it’s more verbose.

@pspeed, I could have sworn that Groovy now supports Android. I don’t know if Groovy on Android supports on-the-fly compilation, however, so the styles may need to be pre-compiled and packaged as Dex code. It may also be a version issue, if the version of Groovy being used is too old. If I remember correctly (not at my computer to check my gradle dependencies), Lemur can use any Groovy version, right? I.e., the Lemur package doesn’t depend on a specific version of Groovy?

Should be true, yeah.

Since he’s not getting a NoClassDefFoundError, I’m guessing he has it on the classpath… but I’m about 90% certain that Groovy code needs to be precompiled to Dex bytecode in order to run on Android. Never tried it so I’m not positive though.

package mygame;

import com.simsilica.lemur.Button;
import com.simsilica.lemur.Command;
import com.simsilica.lemur.Container;
import com.simsilica.lemur.GuiGlobals;
import com.simsilica.lemur.Label;

public class GuiDemo extends SimpleApplication {

public static void main( String... args ) {
    GuiDemo main = new GuiDemo();

public void simpleInitApp() {
    // Initialize the globals access so that the defualt
    // components can find what they need.
    // Load the 'glass' style
    // Set 'glass' as the default style when not specified

    // Create a simple container for our elements
    Container myWindow = new Container();
    // Put it somewhere that we will see it
    // Note: Lemur GUI elements grow down from the upper left corner.
    myWindow.setLocalTranslation(300, 300, 0);

    // Add some elements
    myWindow.addChild(new Label("Hello, World."));
    Button clickMe = myWindow.addChild(new Button("Click Me"));
    clickMe.addClickCommands(new Command<Button>() {
            public void execute( Button source ) {
                System.out.println("The world is yours.");

}any idea on how to modify the following code so that it will no longer require groovy so that it wil run on android:

Taking that out should do it, but you will have no style applied at all.

thanks for the help. it works! My problem now is how to add style without using groovy because i use android . can you share a link on how to do this?

I’ve never encountered this in the Lemur docs. I suggest you start by investigating the documentation and the style related sources on GitHub, and asking @pspeed if you can’t figure something out yourself.

You also have the github’s wiki: Styling · jMonkeyEngine-Contributions/Lemur Wiki · GitHub

Always nice when someone reads the docs. :slight_smile: Thanks for posting the direct link to exactly what I’ve been saying.