I'm not familiar with R8. I've to learn it first. However, I was getting the same issue that you're getting now. Then I've enabled the desuagr_dex and the issue is gone. (Tried with ProGuard and also without ProGuard)
I've compiled the code that you provided earlier using JDK11. And everything goes fine, also on Kodular, too.
Yes, it's a simple extension without additional libraries, as I mentioned it packs all androidx libraries and more into the extension. My extension without proguard is about 12MB.
Using rush with the same code and libraries I don't have to desugate dex and the extension builds without a problem.
I think I figured out what the problem was. It was because of the version of d8 I was using. I switched to an older version and now it's working fine. You might want to do the same. Thanks again for all your help and addressing issues.
I tried using the D8 files in Fast that I use in Rush and it didn't improve the compilation.
Maybe you have an extension in your resources for which you had to pack androidx libraries because the ones from appinventor were too old. Try Fast on that extension.
The problem seems to be the version of Java we are compiling in. If we compile in Java8, the compilation requires minSDK set to 24 in Fast.xml, and if in Java11, then minSDK - 26. Then the compilation is successful.
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
Which is weird because the libraries I'm using have minSdk 21. So I think it's about the java version.
Is it possible that java11 is supported from sdk26? I have to test it on an emulator.
A similar error is described here:
This means that java8 functions may not be supported before api26.
I also read somewhere that java11 functions are fully supported from api33 onwards.
The most important thing is that the compilation ends successfully. I still need to test all the extension functions, whether all the classes will be available.
Ok, I've got the issue. The Windows 7 is pointed to JRE instead of JDK. Could you please confirm me that is the javac command working on your Windows 7?