If you haven't, you should exit the companion and reconnect again for starters. The extension is considered like an asset file and sent to the companion when you are connecting, and maybe, the extension is not sent to your device.
If this still persists, then you may have to build the app in order to test.
How to avoid runtime errors with the companion app
After importing an extension, please restart the companion app.
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.
In case restarting the companion app does not work for you after trying several times, then as it looks like the only way for you to test you app will be after building it using the apk file.
I am using Android ver 9 on my phone, connected via USB
The extension I am currently trying to use is ColinTreeListView but that same happens no matter which I try (FirebaseAuth, FirebaseStorage, TaifunTextBox and more always fails).
I will try that clear assets shortly.
This is actually funny (not).
I imported that deleteAssetsCompanion.aia, certainly does not load into companion, so I built it and installed and list files show blank array delete files seems to do nothing.
I restart the browser and companion upon restart the deleteAssetsCompanion was the last project so it autoloads and wham case in point error.
Via USB, I have no WIFI to try.
For what its worth I've been filtering logcat and I see a bunch of _values POST but I don't see _extensions.
12-25 04:59:03.449 20200 20254 D AppInvHTTPD: POST '/_values'
Yes I did test with APK, that works fine. Using the APK is how i've using AI2 because the companion has never worked with extensions for me but its become a pain to do so here I am trying to get it working.
When I examine the logs and grok the code it almost seems like the scheme code is getting evaluated before the extension get there.
Still groking
I wonder if me running Linux has anything to do with it. Mark my words I will track this issue down since my last little app took about 100 build/download/install apk. I'm done with that cycle.
I'll report my finding on here, thanks a lot for your help so far.
Are you guys certain that extension can be loaded via USB connection?
I ask this because looking at the code for all this the only mechanism I can see for actually getting extensions over to the Companion is via the AssetFetcher.loadExtensions which builds a list and calls ReplForm.loadComponents which then fetches the file with the url provided from replmgr.js, This does not get called at all when you are in usb/emulator mode so how could it be working.
I have gotten it working for myself but my fix would not work unless you are running locally.
My fix is as follows:
File: appinventor-sources/appinventor/blocklyeditor/src/replmgr.js
Added the line to line 1170 top.ReplState.hasfetchassets = true;
This is what tells it to process extensions.
File: appinventor-sources/appinventor/misc/emulator-support/aiStarter.py
Added the line to line 125 subprocess.check_output('"%s" -s %s reverse tcp:8888 tcp:8888' % (ADB, device), shell=True)
This just sets up a forward from my phone to my local machine running AI2, it just works then.
A more permanent fix would be to just implement the rendezvous stack into aiStarter and it could in turn fetch the files and pass it along.
If it doesn't work under Linux for you, you could certainly run Windows under Linux. (However, I've never done it.) As I said, I've been using AI2Starter for almost 10 years now on various versions of Windows and on dozens of computers/notebooks without any problems.