BLE beacon extension causes the app to crash with "Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager"

I developed an extension using the "Android Beacon Library" and the new "@UsesServices" annotation for defining some services in AndroidManifest.xml.

  1. If I import the extension in a Kodular test app the @UsesServices is disregarded, I must manually modify the AndroidManifest.xml and the test app runs OK.

  2. If I import the same extension in a similar MIT appinventor test app the @UsesServices is handled correctly (the AndroidManifest.xml is OK) but the app crashes immediately with the runtime error "Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager"

I know that Kodular is not able of handling the new annotations so far, but I don't understand the reason for crashing the app with MIT appinventor.

Some suggestions ?

yes, because Kodular does neither support the new annotations nor the AndroidX library up to now...

you will have to import the AndroidX library, which is

import androidx.localbroadcastmanager.content.LocalBroadcastManager;



Thank you Taifun for your hint.
I tried to insert the import you suggested in the extension Java code but this doesn't solve the problem on MIT appinventor.
As soon as I launch the test app (including the new generated extension) it crashes with the same error "Failed resolution of: Landroid/support/v4/content/LocalBroadcastManager".
I'm afraid this problem is due to the MIT appinventor platform as it doesn't happen with Kodular

which means, you are still using somewhere the old Android support library instead of the new AndroidX library



Perhaps the AltBeacon library is using the old Android support library. I will try to use a more recent version of that library

OK - I solved the problem with MIT appinventor rebuilding my extension with the newest version of AltBeacon library (2.17.1)

1 Like