D8 Fix is Available

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.

11 Likes

Itā€™s a good news

1 Like

My project is still running into the ā€˜D8 Failedā€™ error. In the view log, I couldnā€™t find any message about the extension name or conflicting classes that might be causing the issue, as mentioned before. Any ideas on what I should do next?

Just a noteā€”my project doesnā€™t have any extensions installed.

1 Like

Is it a large project?
Show us a screenshot the unchive statistics overview

Taifun

Can you paste here the logs?

Since your project doesnā€™t use any extensions, this fix is not applicable in your case.

Kodular is unable to compile this project.
The compiler error output was
[ReadBuildInfo] Starting Task
[ReadBuildInfo] Task succeeded in 0.003 seconds
[LoadComponentInfo] Starting Task
[LoadComponentInfo] INFO: Generating assetsā€¦
[LoadComponentInfo] Component assets needed, n = 7
[LoadComponentInfo] INFO: Generating activitiesā€¦
[LoadComponentInfo] Component activities needed, n = 0
[LoadComponentInfo] Component activity metadata needed, n = 0
[LoadComponentInfo] INFO: Generating broadcast receiversā€¦
[LoadComponentInfo] INFO: Generating librariesā€¦
[LoadComponentInfo] Libraries needed, n = 29
[LoadComponentInfo] Component metadata needed, n = 0
[LoadComponentInfo] INFO: Generating Android minimum SDKā€¦
[LoadComponentInfo] INFO: Generating native librariesā€¦
[LoadComponentInfo] Native Libraries needed, n = 0
[LoadComponentInfo] INFO: Generating permissionsā€¦
[LoadComponentInfo] usesLocation = False
[LoadComponentInfo] Permissions needed, n = 18
[LoadComponentInfo] Component xmls needed, n = 0
[LoadComponentInfo] INFO: Generating component broadcast receiversā€¦
[LoadComponentInfo] Task succeeded in 0.003 seconds
[KodularCommissionAnalyzer] Starting Task
[KodularCommissionAnalyzer] Task succeeded in 0.0 seconds
[PrepareAppIcon] Starting Task
[PrepareAppIcon] INFO: Creating mipmap dirsā€¦
[PrepareAppIcon] INFO: Generating iconsā€¦
[PrepareAppIcon] Generating icons for mipmap-mdpi
[PrepareAppIcon] Generating icons for mipmap-hdpi
[PrepareAppIcon] Generating icons for mipmap-xhdpi
[PrepareAppIcon] Generating icons for mipmap-xxhdpi
[PrepareAppIcon] Generating icons for mipmap-xxxhdpi
[PrepareAppIcon] Task succeeded in 0.256 seconds
[XmlConfig] Starting Task
[XmlConfig] INFO: Creating animation xml
[XmlConfig] Creating zoom_enter.xml
[XmlConfig] Creating fadeout.xml
[XmlConfig] Creating slide_v_exit.xml
[XmlConfig] Creating fadein.xml
[XmlConfig] Creating zoom_exit.xml
[XmlConfig] Creating slide_v_enter.xml
[XmlConfig] Creating zoom_exit_reverse.xml
[XmlConfig] Creating slide_v_enter_reverse.xml
[XmlConfig] Creating zoom_enter_reverse.xml
[XmlConfig] Creating slide_enter_reverse.xml
[XmlConfig] Creating slide_exit.xml
[XmlConfig] Creating hold.xml
[XmlConfig] Creating slide_enter.xml
[XmlConfig] Creating slide_v_exit_reverse.xml
[XmlConfig] Creating slide_exit_reverse.xml
[XmlConfig] INFO: Creating colors xml
[XmlConfig] INFO: Creating styles xml
[XmlConfig] INFO: Creating provider_path xml
[XmlConfig] INFO: Creating network_security_config xml
[XmlConfig] INFO: Generating adaptive icon file
[XmlConfig] INFO: Generating round adaptive icon file
[XmlConfig] INFO: Generating adaptive icon background file
[XmlConfig] INFO: Creating fragment xml
[XmlConfig] INFO: Creating listview xml
[XmlConfig] INFO: Creating listview-21 xml
[XmlConfig] INFO: Creating drawable xml
[XmlConfig] INFO: Creating drawable-21 xml
[XmlConfig] INFO: Creating strings xml
[XmlConfig] Task succeeded in 0.002 seconds
[CreateManifest] Starting Task
[CreateManifest] INFO: Reading project specsā€¦
[CreateManifest] VCode: 1
[CreateManifest] VName: 1.0
[CreateManifest] Custom Package Name: com.sinarmonas_smimobile
[CreateManifest] Min SDK 21
[CreateManifest] INFO: Writing screen ā€˜io.kodular.dmcproject19.SMIMobile.SMIMobile_Appsā€™
[CreateManifest] INFO: Writing screen ā€˜io.kodular.dmcproject19.SMIMobile.Screen1ā€™
[CreateManifest] Task succeeded in 0.001 seconds
[AttachNativeLibs] Starting Task
[AttachNativeLibs] Task succeeded in 0.0 seconds
[AttachAarLibs] Starting Task
[AttachAarLibs] Task succeeded in 0.158 seconds
[AttachCompAssets] Starting Task
[AttachCompAssets] Task succeeded in 0.016 seconds
[MergeResources] Starting Task
[MergeResources] Task succeeded in 0.258 seconds
[SetupLibs] Starting Task
[SetupLibs] Task succeeded in 0.0 seconds
[RunAapt2] Starting Task
[RunAapt2] Task succeeded in 0.86 seconds
[GenerateClasses] Starting Task
[GenerateClasses] INFO: Source File: io/kodular/dmcproject19/SMIMobile/SMIMobile_Apps.yail
[GenerateClasses] INFO: Source File: io/kodular/dmcproject19/SMIMobile/Screen1.yail
(compiling io/kodular/dmcproject19/SMIMobile/SMIMobile_Apps.yail to io.kodular.dmcproject19.SMIMobile.SMIMobile_Apps)
(compiling io/kodular/dmcproject19/SMIMobile/Screen1.yail to io.kodular.dmcproject19.SMIMobile.Screen1)
(compiling /tmp/runtime16963288092596892983.scm to com.google.youngandroid.runtime)
[GenerateClasses] Task succeeded in 29.778 seconds
[RunD8] Starting Task
[RunD8] ERROR: d8 failed.
[RunD8] Task errored in 36.237 seconds

Note :

  • For this issue, I also sent an email to you on March 20, 2025.
  • Only a few media I store in assets, most of them use links I store on my server and gdrive

In your case I think you used too much components on screen SMMobile_App

Reuse your components or try to splitt that screen into 2 screens

Taifun

Alright, Iā€™ll give it a try. Iā€™ve been using the minimum number of screens based on advice and tutorials to improve app performance, but it turns out that wasnā€™t the right approach.

To make sure everything runs smoothly, could you give me some guidelines on the maximum number of components, assets, screens, or blocks I should use?

Use procedures while using muliple compomemts

A post was split to a new topic: Error runtime undefined


issue occurred after I updated the version name to 1.0-d8fix

you have to ask for update the ā€œorientation fixā€ extension , or remove it if not nessesary

D8 Build fails using below extension:

Build Log without --d8fix:

[RunD8] Starting Task
[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.android.material.animation.AnimationUtils": ["com.mrkoder.dialoge.dev.alphadialog"]
[RunD8] ERROR: d8 failed.
[RunD8] Task errored in 2.571 seconds

Build Log with --d8fix:

[RunD8] Starting Task
[RunD8] D8 fix requested...
[RunD8] Filtering JAR: /tmp/1743016828678_6111368589563591680-0/youngandroidproject/../assets/external_comps/com.dreamers.recyclerlist/files/AndroidRuntime.jar
[RunD8] Filtering JAR: /tmp/1743016828678_6111368589563591680-0/youngandroidproject/../assets/external_comps/com.yusufcihan.DynamicComponents/files/AndroidRuntime.jar
[RunD8] Filtering JAR: /tmp/1743016828678_6111368589563591680-0/youngandroidproject/../assets/external_comps/com.mrkoder.dialoge.dev.alphadialog/files/AndroidRuntime.jar
[RunD8] Filtering JAR: /tmp/1743016828678_6111368589563591680-0/youngandroidproject/../assets/external_comps/io.shreyash.phase/files/AndroidRuntime.jar
[RunD8] Filtering JAR: /tmp/1743016828678_6111368589563591680-0/youngandroidproject/../assets/external_comps/com.sunny.DateTools/files/AndroidRuntime.jar
[RunD8] Filtering JAR: /tmp/1743016828678_6111368589563591680-0/youngandroidproject/../assets/external_comps/com.LukeGackle.countdown/files/AndroidRuntime.jar
[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.android.material.animation.AnimationUtils": ["com.mrkoder.dialoge.dev.alphadialog"]
[RunD8] ERROR: Sorry, we couldn't fix the D8 issue automatically. Please ask the extension developer to provide a compatible version of the extension.
[RunD8] ERROR: d8 failed.
[RunD8] Task errored in 120.171 seconds.

V3 compiled with no error
also for knowing Iā€™am using " Material Components For Android Liberary"

Build fails on Kodular creator not on AI2.

From what I can tell, Kodular is still active with new updates, and I like that. Iā€™ll slowly migrate back to Kodular because itā€™s not dead, as they say. We keep updating, and that makes me happy. :heart::heart::heart:

1 Like