This is the third time I'm posting this test app. With Companion, I get a permission error with the File.Read method. With the APK, all READ permissions (AUDIO, IMAGES, VIDEO) must be granted for the File.Exists method to work. If just one permission is denied, you get a permission error.
Therefore, I repeat my suggestion to remove all automatic storage permission requests (at least for later Android versions, Android 11+).
Are you sure we’re talking about the same thing? The extension I shared doesn’t have any of those classes or resources.
Also, if we edit the .aia file and add assets in folders like assets/test/somefolder/somesetting.xml, then import that edited .aia to the test server and build the APK, the APK’s assets folder doesn’t contain those files.
What about the assets of extensions. They are in asset folder of apk under a folder named after the package name of extension. So that means that App Inventor built apps can have subfolders in assets.
Each extension can have its own resources in an assets folder. However, these resources are placed in separate folders. Resources added in the AI2 designer don't have folders, whereas extension resources are placed in folders. If I remember correctly, the folder name is the extension package name.
Unfortunately, it was unable to merge assets files also. The AAR file has a .txt file in assets and it is absent in the APK. I've decompiled the apk and that .txt file is not found in the assets directory.
I tested the AAR add-in function from extensions. I used the Android x Media3 library and the session module. Unfortunately, the APK fails to compile and receives an aapt error for no apparent reason. The library contains many drawables and language files. Could this be a memory issue on the build server? After removing a larger number of language files, the APK compiles.
These two projects are identical and use the same extension. Both have the aar library included. In one project, I manually removed the res folder from the aar library.
Ok, I see detailed errors in the local console. Layout resources from the Media3 session module require xml dependencies from other modules, which is why I'm getting a compilation error.
I think it would be useful to add the display of aapt errors to the browser's compilation error log.