Good Day everyone!
Ive been trying to export my project into apk so many times but failed.
The logs always show the same error, despite many attempts at correcting the suspected issue has been done.
Log:
Kodular is unable to compile this project.
The compiler error output was
[ReadBuildInfo] Starting Task
[ReadBuildInfo] Task succeeded in 0.006 seconds
[LoadComponentInfo] Starting Task
[LoadComponentInfo] INFO: Generating assets...
[LoadComponentInfo] Component assets needed, n = 7
[LoadComponentInfo] INFO: Generating activities...
[LoadComponentInfo] Component activities needed, n = 1
[LoadComponentInfo] Component activity metadata needed, n = 0
[LoadComponentInfo] INFO: Generating broadcast receivers...
[LoadComponentInfo] INFO: Generating libraries...
[LoadComponentInfo] Libraries needed, n = 12
[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 = 8
[LoadComponentInfo] INFO: Component "com.yusufcihan.DynamicComponents.DynamicComponents" does not specify xmls
[LoadComponentInfo] Component xmls needed, n = 0
[LoadComponentInfo] INFO: Generating component broadcast receivers...
[LoadComponentInfo] Task succeeded in 0.005 seconds
[CheckDeprecatedComponents] Starting Task
[CheckDeprecatedComponents] Task succeeded in 0.025 seconds
[CheckComponentRequirements] Starting Task
[CheckComponentRequirements] Task succeeded in 0.0 seconds
[VerifyExtensions] Starting Task
[VerifyExtensions] Task succeeded in 0.088 seconds
[GenerateBuildId] Starting Task
[GenerateBuildId] INFO: Skipping Build ID generation for App with no required components.
[GenerateBuildId] Task succeeded in 0.0 seconds
[RetrieveGamAdUnit] Starting Task
[RetrieveGamAdUnit] INFO: Skipping Ad Unit ID retrieval for app with no required components.
[RetrieveGamAdUnit] 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.049 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.003 seconds
[CreateManifest] Starting Task
[CreateManifest] INFO: Reading project specs...
[CreateManifest] VCode: 1
[CreateManifest] VName: 1.0
[CreateManifest] Custom Package Name: io.kodular.asiliameruna.Expiry_Submission_Lite_1
[CreateManifest] Min SDK 21
[CreateManifest] INFO: Writing screen 'io.kodular.asiliameruna.Expiry_Submission_Lite_1.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.061 seconds
[AttachCompAssets] Starting Task
[AttachCompAssets] Task succeeded in 0.004 seconds
[MergeResources] Starting Task
[MergeResources] Task succeeded in 0.045 seconds
[SetupLibs] Starting Task
[SetupLibs] Task succeeded in 0.001 seconds
[RunAapt] Starting Task
[RunAapt] Task succeeded in 0.601 seconds
[GenerateClasses] Starting Task
[GenerateClasses] INFO: Source File: io/kodular/asiliameruna/Expiry_Submission_Lite_1/Screen1.yail
[GenerateClasses] ERROR: Kawa compile has failed.
(compiling io/kodular/asiliameruna/Expiry_Submission_Lite_1/Screen1.yail to io.kodular.asiliameruna.Expiry_Submission_Lite_1.Screen1)
ERROR: io/kodular/asiliameruna/Expiry_Submission_Lite_1/Screen1.yail line 8: caught exception in inline-compiler for #<procedure gnu.kawa.functions.AppendValues> - java.lang.Error: at PC 261: SP at end of 'then' was 5 while SP at end of 'else' was 0
gnu.bytecode.CodeAttr.emitFi(CodeAttr.java:1906)
gnu.expr.IfExp.compile(IfExp.java:135)
gnu.expr.IfExp.compile(IfExp.java:52)
gnu.expr.Expression.compileNotePosition(Expression.java:156)
gnu.expr.Expression.compileWithPosition(Expression.java:127)
gnu.kawa.functions.AppendValues.compile(AppendValues.java:43)
gnu.expr.ApplyExp.inlineCompile(ApplyExp.java:586)
gnu.expr.ApplyExp.compile(ApplyExp.java:173)
gnu.expr.ApplyExp.compile(ApplyExp.java:110)
gnu.expr.Expression.compileNotePosition(Expression.java:156)
gnu.expr.Expression.compileWithPosition(Expression.java:142)
gnu.expr.LambdaExp.compileBody(LambdaExp.java:1619)
gnu.expr.Compilation.generateBytecode(Compilation.java:2107)
gnu.expr.Compilation.process(Compilation.java:1984)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:330)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:315)
kawa.repl.compileFiles(repl.java:783)
kawa.repl.processArgs(repl.java:412)
kawa.repl.main(repl.java:827)
[GenerateClasses] ERROR: Can't find class file for Screen 'Screen1'
[GenerateClasses] Task errored in 0.717 seconds
.
Based on the error code, ive tried to fix the suspected if else block, with the helps of Gemini AI, but still failed.
My fixes are centered around the error of:
ERROR: io/kodular/asiliameruna/Expiry_Submission_Lite_1/Screen1.yail line 8: caught exception in inline-compiler for #<procedure gnu.kawa.functions.AppendValues> - java.lang.Error: at PC 261: SP at end of 'then' was 5 while SP at end of 'else' was 0
Fixed block:
I’ve tried deleting this block and retry exporting into APK, but the same problem still happen.
Opening my project in companion is fine. No error happened.
Here is the aia file for those who wanted to help.
Expiry_Submission_Lite.aia (255.4 KB)
Please advise.
