There is an issue with the latest updates to the buildserver released in February, which has been causing 10-12% of the active builds to fail. This issue is caused when a project has extension(s) that bundles a copy of the library that Kodular runtime already uses. With the last update, we switched from DX to D8 compiler, which is the official Android compiler from Google that includes optimizations necessary for latest Android versions and devices. The D8 compiler requires that duplicate classes are not allowed to compile the app. Duplicate classes can otherwise cause the app to behave with uncertainty and can cause crashes.
The good news is that we now have a fix available!
Previously, when you attempt to build an app, you would have seen the following log.
[RunD8] Starting Task
[RunD8] ERROR: d8 failed.
[RunD8] Task errored in 45.347 seconds
Now, when you build your app, if your project is affected by this D8 issue, you shall now see the following messages in the build logs. There, we are printing the name of the extension(s) causing the failure, as well as the conflicting class name.
[RunD8] ERROR: Your project contains extensions that conflict with internal libraries.
[RunD8] INFO: Help: You can either remove the conflicting extensions OR add "-d8fix" at the end of your app's version name to fix this automatically.
[RunD8] INFO: Note: "-d8fix" might result in unexpected behaviour in some cases.
[RunD8] ERROR: Classes and conflicting external packages:
- "com.google.appinventor.components.common.OptionList": ["com.sumit.orientationfix"]
The log, then, says that you can āopt-inā to the available fix by adding ā-d8fixā to the end of the version name in the project settings. Please note that this fix has a low success rate of under 75% as per our internal testing against the AIA files submitted by the users who have volunteered.
In any case, we advise that you reach out to the extension developer and use a compatible version of the extension in your projects.
We apologize for all the trouble caused.