Got this error "java.lang.RuntimeException: no such class" when import extension

Unable to use CompCreator, any example I use or make gives following error upon load:

Error from Companion: java.lang.RuntimeException: invalid syntax in eval form: :38:1: caught exception in inliner for # - java.lang.RuntimeException: no such class: cn.kevinkun.CompCreator.CompCreator gnu.bytecode.ObjectType.getReflectClass(ObjectType.java:179) gnu.bytecode.ClassType.getModifiers(ClassType.java:103) 

Using extention version: 8.3

Best regards
Ove Halseth

How did you used it?
post relavent blocks here, or a small demo aia.

I get the error when I drop the CompCreator on my Screen.
And the companion goes to blank screen.

I will try on another computer and se if it's local.

Whenever you add a new extension, always exit the companion and reconnect.

1 Like

How to avoid runtime errors with the companion app

  1. After importing an extension, please restart the companion app.
  2. If you like to use an extension on a different screen, in Screen1 additionally drag the extension into the working area.

While starting the companion app, all necessary assets and also the imported extensions of your project will be copied to your device. So in case the no such class error shows up, the extension code to run the extension is not available on your device. Without that code the companion app is not able to execute methods from the extension.

Taifun

1 Like

Have tried, same result

But will I have to do more than importing the extension?
Do I have to install it in the companion app?

Ove B-)

Am able to add CompCreator without error as long as the Companion isn't connected.
So it is the companion app that have problem loading the extension.

Tried an other extension(ImageProcessor), and got the same problem.

uninstall and re install companion then try

Hmm, same error :cry:

Will see if things work on my home computer.

Hello Ove

Do you have other extensions installed? I ask because it sounds as though this is your first.

Good guess, it's my first. Is there anything else you need to do, other than import it and restart the companion?

It's the same on my home computer. Both are windows 10 if that matters.

So is there any error when you import other extension, without import CompCreator?
If yes, then maybe I need move your post to a new thread.

Yes, all components. So will start new thread👍

After importing, you must drag the extension into the Designer, on top of the Designer background (image of phone) and it will snap to a row below the image - after that, the extension is installed.

Ove - what Browser are you using? It must be Firefox or Chrome.

what's the android version? is your Companion the latest version? Is any problem when compile to apk?

Found a workaround in this thread:

It's apparently a bug, and the workaround is to load your app in AI Companion first. After that Emulator will work for that session.

1 Like

That is not a 100% solution since the Emulator is not compatible with everything you throw at it.

If you have the AI2 Companion on a device for testing, it is better to use it rather than the Emulator - you are then testing how Android executes your code and how Android displays your GUI.

1 Like

Guys this is a bug.
I've tried with the simplest app, just a button or something like that add any extension at all and Companion with not work period until you remove the extension.
Can one of the devs point me in a direction to look so I can go after the code that does this.