Problem with APK

Good afternoon. when building the APK, it issues this error. Help me figure out what the reason is.

Kodular is unable to compile this project.
The compiler error output was
________Checking dangerous extensions
________Preparing application icon
________Creating animation xml
________Creating fragment xml
________Creating listview xml in res/layout/…
________Creating listview xml in res/layout-v21/…
________Creating xml in res/drawable/…
________Creating splash png in res/drawable/…
________Creating colors xml
________Creating styles xml
________Creating drawables xml v21
________Checking for firebase
________Creating provider_path xml
________Creating network_security_config xml
________Generating adaptive icon file
________Generating round adaptive icon file
________Generating adaptive icon background file
________Generating manifest file
________Attaching native libraries
________Attaching Android Archive (AAR) libraries
________Attaching component assets
________Invoking AAPT
AAPT time: 2.059 seconds
________Compiling source files
(compiling io/kodular/zapertov/qq/Screen4.yail to io.kodular.zapertov.qq.Screen4)
(compiling io/kodular/zapertov/qq/Screen2.yail to io.kodular.zapertov.qq.Screen2)

ERROR: io/kodular/zapertov/qq/Screen2.yail line 26: caught exception in inline-compiler for # - java.lang.Error: at PC 860: SP at end of ‘then’ was 3 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)
Kawa compile time: 1.382 seconds
.

Check your blocks in Screen2 , do you have an if then , else condition ? Do you have any warnings or errors in your block section ?

1 Like

In my application, there is a variable that encloses large text (database). And if you reduce the length of this text, then the apk is built without errors. But if this is the case, then why did you get an error on the IF / ELSE block?

I recall reading something similar in MIT App Inventor community, maybe that’s the case

How to load lots of text without crashing AI2

1 Like

thank. I divided the large base into several small ones and gradually added to the pereyennaya. so far this is working fine

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.