Can not build apk file from the same sketch from which I built previously

Error I am getting

App Inventor is unable to compile this project.
The compiler error output was
[ReadBuildInfo] Starting Task
[ReadBuildInfo] Task succeeded in 0.002 seconds
[LoadComponentInfo] Starting Task
[LoadComponentInfo] INFO: Generating assets...
[LoadComponentInfo] Component assets needed, n = 0
[LoadComponentInfo] INFO: Generating activities...
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify activities
[LoadComponentInfo] Component activities needed, n = 0
[LoadComponentInfo] INFO: Component "com.KIO4_Bluetooth.KIO4_Bluetooth" does not specify activityMetadata
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify activityMetadata
[LoadComponentInfo] Component activity metadata needed, n = 0
[LoadComponentInfo] INFO: Generating broadcast receivers...
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify broadcastReceivers
[LoadComponentInfo] INFO: Component "com.KIO4_Bluetooth.KIO4_Bluetooth" does not specify contentProviders
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify contentProviders
[LoadComponentInfo] INFO: Generating libraries...
[LoadComponentInfo] Libraries needed, n = 5
[LoadComponentInfo] INFO: Component "com.KIO4_Bluetooth.KIO4_Bluetooth" does not specify metadata
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify metadata
[LoadComponentInfo] Component metadata needed, n = 0
[LoadComponentInfo] INFO: Generating Android minimum SDK...
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify androidMinSdk
[LoadComponentInfo] INFO: Generating native libraries...
[LoadComponentInfo] Native Libraries needed, n = 0
[LoadComponentInfo] INFO: Generating permissions...
[LoadComponentInfo] usesLocation = False
[LoadComponentInfo] Permissions needed, n = 15
[LoadComponentInfo] INFO: Component "com.KIO4_Bluetooth.KIO4_Bluetooth" does not specify queries
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify queries
[LoadComponentInfo] INFO: Component "com.KIO4_Bluetooth.KIO4_Bluetooth" does not specify services
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.BluetoothLE" does not specify services
[LoadComponentInfo] INFO: Generating component broadcast receivers...
[LoadComponentInfo] Task succeeded in 0.002 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.093 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 style 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] Task succeeded in 0.001 seconds
[CreateManifest] Starting Task
[CreateManifest] INFO: Reading project specs...
[CreateManifest] VCode: 1
[CreateManifest] VName: 1.0
[CreateManifest] Min SDK 7
[CreateManifest] INFO: Writing screen 'appinventor.ai_susmimu.ig_09_08_24_19_19_everything_working.Screen2'
[CreateManifest] INFO: Writing screen 'appinventor.ai_susmimu.ig_09_08_24_19_19_everything_working.Screen1'
[CreateManifest] Task succeeded in 0.0 seconds
[AttachNativeLibs] Starting Task
[AttachNativeLibs] Task succeeded in 0.0 seconds
[AttachAarLibs] Starting Task
[AttachAarLibs] Task succeeded in 0.044 seconds
[AttachCompAssets] Starting Task
[AttachCompAssets] Task succeeded in 0.004 seconds
[MergeResources] Starting Task
[MergeResources] Task succeeded in 0.068 seconds
[SetupLibs] Starting Task
[SetupLibs] Task succeeded in 0.0 seconds
[RunAapt] Starting Task
[RunAapt] Task succeeded in 0.466 seconds
[GenerateClasses] Starting Task
[GenerateClasses] INFO: Source File: appinventor/ai_susmimu/ig_09_08_24_19_19_everything_working/Screen2.yail
[GenerateClasses] INFO: Source File: appinventor/ai_susmimu/ig_09_08_24_19_19_everything_working/Screen1.yail
[GenerateClasses] INFO: Libraries Classpath = /tmp/kawa10505080465314579761.jar:/tmp/acra-4.4.01253580785961182338.jar:/tmp/AndroidRuntime2334289010543598900.jar:/tmp/annotation16821703142949799331.jar:/tmp/annotation-experimental16606256560315812120.jar:/tmp/appcompat17505172172763797438.jar:/tmp/asynclayoutinflater1338706063400829184.jar:/tmp/collection16037100274958003338.jar:/tmp/constraintlayout6979691718803091430.jar:/tmp/constraintlayout-solver13715971388632824606.jar:/tmp/coordinatorlayout9979748870560030019.jar:/tmp/core6128178103996951857.jar:/tmp/core-common17314866132750465248.jar:/tmp/core-runtime17973656645698992258.jar:/tmp/cursoradapter2929423469835051252.jar:/tmp/customview13559586579993455226.jar:/tmp/documentfile3775984577837786126.jar:/tmp/drawerlayout12872266432252997468.jar:/tmp/fragment8333404422302920455.jar:/tmp/interpolator11575377567706327790.jar:/tmp/legacy-support-core-ui15726326120307884536.jar:/tmp/legacy-support-core-utils10364350671015390333.jar:/tmp/lifecycle-common11071427831108033535.jar:/tmp/lifecycle-livedata17789710491787824110.jar:/tmp/lifecycle-livedata-core10060025401087252109.jar:/tmp/lifecycle-runtime3721040668431865800.jar:/tmp/lifecycle-viewmodel12115872126053600434.jar:/tmp/loader6854265155562846577.jar:/tmp/localbroadcastmanager9268861247455066647.jar:/tmp/print14601759306035655383.jar:/tmp/slidingpanelayout7208085862670322193.jar:/tmp/swiperefreshlayout9986923718012668405.jar:/tmp/vectordrawable9950436720084430765.jar:/tmp/vectordrawable-animated343218861391915864.jar:/tmp/versionedparcelable5342104993240141210.jar:/tmp/viewpager5382871814880052193.jar:/tmp/1737722552310_983939911445828608-0/youngandroidproject/../assets/external_comps/com.KIO4_Bluetooth/files/AndroidRuntime.jar:/tmp/1737722552310_983939911445828608-0/youngandroidproject/../assets/external_comps/com.google.appinventor.components.runtime.BluetoothLE/files/AndroidRuntime.jar:/tmp/recyclerview13452392433677778202.jar:/tmp/cardview16753305016486803229.jar:/tmp/dynamicanimation9938838688365178323.jar:/tmp/1737722552310_983939911445828608-0/youngandroidproject/../build/classes:/tmp/android3078142187373353040.jar
[GenerateClasses] ERROR: Kawa compile has failed.
(compiling appinventor/ai_susmimu/ig_09_08_24_19_19_everything_working/Screen2.yail to appinventor.ai_susmimu.ig_09_08_24_19_19_everything_working.Screen2)

ERROR: appinventor/ai_susmimu/ig_09_08_24_19_19_everything_working/Screen2.yail line 1188: caught exception in inliner for # - java.lang.RuntimeException: no such class: edu.mit.appinventor.ble.BluetoothLE

gnu.bytecode.ObjectType.getReflectClass(ObjectType.java:179)
gnu.bytecode.ClassType.getModifiers(ClassType.java:103)
gnu.bytecode.ClassType.isInterface(ClassType.java:471)
gnu.expr.InlineCalls.checkType(InlineCalls.java:56)
gnu.expr.InlineCalls.visit(InlineCalls.java:49)
gnu.expr.InlineCalls.visitSetExpValue(InlineCalls.java:363)
gnu.expr.InlineCalls.visitSetExpValue(InlineCalls.java:28)
gnu.expr.ExpVisitor.visitSetExp(ExpVisitor.java:114)
gnu.expr.InlineCalls.visitSetExp(InlineCalls.java:369)
gnu.expr.InlineCalls.visitSetExp(InlineCalls.java:28)
gnu.expr.SetExp.visit(SetExp.java:406)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:55)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.visitBeginExp(InlineCalls.java:272)
gnu.expr.InlineCalls.visitBeginExp(InlineCalls.java:28)
gnu.expr.BeginExp.visit(BeginExp.java:156)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:51)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.visit(InlineCalls.java:28)
gnu.expr.ExpVisitor.visitAndUpdate(ExpVisitor.java:161)
gnu.expr.ExpVisitor.visitExps(ExpVisitor.java:175)
gnu.expr.ApplyExp.visitArgs(ApplyExp.java:415)
gnu.kawa.functions.CompileMisc.validateApplyAppendValues(CompileMisc.java:139)
jdk.internal.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.base/java.lang.reflect.Method.invoke(Unknown Source)
gnu.expr.InlineCalls.maybeInline(InlineCalls.java:467)
gnu.expr.QuoteExp.validateApply(QuoteExp.java:150)
gnu.expr.InlineCalls.visitApplyExp(InlineCalls.java:119)
gnu.expr.InlineCalls.visitApplyExp(InlineCalls.java:28)
gnu.expr.ApplyExp.visit(ApplyExp.java:410)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:55)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.visit(InlineCalls.java:28)
gnu.expr.LambdaExp.visitChildrenOnly(LambdaExp.java:1664)
gnu.expr.LambdaExp.visitChildren(LambdaExp.java:1651)
gnu.expr.InlineCalls.visitScopeExp(InlineCalls.java:279)
gnu.expr.InlineCalls.visitLambdaExp(InlineCalls.java:349)
gnu.expr.InlineCalls.visitLambdaExp(InlineCalls.java:28)
gnu.expr.ExpVisitor.visitModuleExp(ExpVisitor.java:103)
gnu.expr.ModuleExp.visit(ModuleExp.java:482)
gnu.expr.ExpVisitor.visit(ExpVisitor.java:51)
gnu.expr.InlineCalls.visit(InlineCalls.java:46)
gnu.expr.InlineCalls.inlineCalls(InlineCalls.java:33)
gnu.expr.Compilation.walkModule(Compilation.java:994)
gnu.expr.Compilation.process(Compilation.java:1965)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:330)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:315)
gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:315)
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 'Screen2'
[GenerateClasses] Task errored in 1.519 seconds

Do you have BluetoothLE extension in your project? Because the error indicates that on screen2 you are using this extension. But it is as if it is not available.

Yes I have Used BluetoothLE extension. I have updated the BLE Extension today.
When I am connecting my Mobile Phone with AI Companion its running fine. Only the issue is in building the .apk file

Check that you do not have any errors in screen2 in blocks.
Updating the extension may have caused some minor errors.

It looks like you have an old copy of the original BLE extension in your project but your YAIL file references the new BLE extension name. The original extension is incompatible with all future versions. If you send me a copy of your project I can excise the old version from the project file.

2 Likes

ig_24_01_25_11_33.aia (2.8 MB)
Here I have attached my project file. @ewpatton

grafik

Your project seems to be broken.

What should I do now? Suggest pls...
Do I need to make the full blocks again? It will be tedius.

Here is a corrected version that should compile.

ig_24_01_25_11_33.aia (2.7 MB)

1 Like

Thanks a lot Sir for your great help!
The corrected file you provided is compiled successfully. Thank you again! :heart: @ewpatton

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