Build failed and i dont know how to fix this

please help me to fix this

Welcome.

The Build failed because of an AAPT error. AAPT errors occur for many reasons. Perhaps for one of these reasons:

shttps://community.appinventor.mit.edu/search?q=aapt%20error

You do not share your code Blocks so no one can even guess what your issue might be; sorry.

how to share code blocks? can i share aia file? can you check for me?

App Inventor is unable to compile this project.
The compiler error output was
[ReadBuildInfo] Starting Task
[ReadBuildInfo] Task succeeded in 0.005 seconds
[LoadComponentInfo] Starting Task
[LoadComponentInfo] INFO: Generating assets...
[LoadComponentInfo] Component assets needed, n = 0
[LoadComponentInfo] INFO: Generating activities...
[LoadComponentInfo] Component activities needed, n = 1
[LoadComponentInfo] Component activity metadata needed, n = 0
[LoadComponentInfo] INFO: Generating broadcast receivers...
[LoadComponentInfo] Component content providers needed, n = 0
[LoadComponentInfo] INFO: Generating libraries...
[LoadComponentInfo] Libraries needed, n = 1
[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] INFO: Component "com.google.appinventor.components.runtime.ActivityStarter" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Button" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Form" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.HorizontalArrangement" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.HorizontalScrollArrangement" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Image" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Label" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.ListPicker" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Notifier" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.TextBox" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.VerticalArrangement" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.VerticalScrollArrangement" does not specify permissionConstraints
[LoadComponentInfo] INFO: Component "com.google.appinventor.components.runtime.Web" does not specify permissionConstraints
[LoadComponentInfo] usesLocation = False
[LoadComponentInfo] Permissions needed, n = 6
[LoadComponentInfo] Component services needed, n = 0
[LoadComponentInfo] INFO: Generating component broadcast receivers...
[LoadComponentInfo] Task succeeded in 0.006 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.548 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.005 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_kelompoktiga20223.LansiApp.jadwal'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.mandi'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.pijat'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.katolik'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.Senam'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.input_daftar_obat'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.obat'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.EDUKASI_PAGE'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.remat'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.diabet'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.PERAWATAN_PAGE'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.angkat'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.budha'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.k_pro'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.ROHANI_PAGE'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.dansa'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.berjalan'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.posisi'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.OLAHRAGA_PAGE'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.kerajinan'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.berkebun'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.jntg'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.keseimbangan'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.Screen_Dashboard'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.k_ser'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.k_karbo'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.Musik'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.k_vit'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.yoga'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.k_cairan'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.bacaan'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.Screen1'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.k_zat'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.hindu'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.HIBURAN_SCREEN'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.hiper'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.NUTRISI_PAGE'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.islam'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.osteo'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.konghucu'
[CreateManifest] INFO: Writing screen 'appinventor.ai_kelompoktiga20223.LansiApp.protestan'
[CreateManifest] Task succeeded in 0.002 seconds
[AttachNativeLibs] Starting Task
[AttachNativeLibs] Task succeeded in 0.001 seconds
[AttachAarLibs] Starting Task
[AttachAarLibs] Task succeeded in 0.134 seconds
[AttachCompAssets] Starting Task
[AttachCompAssets] Task succeeded in 0.101 seconds
[MergeResources] Starting Task
[MergeResources] Task succeeded in 0.178 seconds
[SetupLibs] Starting Task
[SetupLibs] Task succeeded in 0.0 seconds
[RunAapt] Starting Task
[RunAapt] ERROR: Error running AAPT
[RunAapt] Task errored in 0.022 seconds
.

  • do you have more than 10 Screens in your Project?

  • to download your Blocks image to your PC, go to Blocks screen; right click on a white area of the screen to see this dropdown.
    downloadblocksasimage
    Then click Download Blocks as Image

i have 30 page:( with aia file maybe?

The recommendation is not to use more than 10 Screens. Sometimes more can be used and then the developer has issues.

My guess is you get the error because of how you use your Screens or in your case number is a factor. Make a copy of your Project; remove a screen and try to recompile. Then do it all again until your projects run might find the problem.

For more specific diagnosis,

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

I upload the aia file here, pls check the file for me and give me solution plsssss
apps - Google Drive i hope you can help me for this, i will really blessed if you can slove this for me

the solution is DRY - Don't repeat yourself... reuse your screens
see also tip 1 here

Taifun

Your app has 41 (!) screens and all screens are switching incorrectly. However, the problem lies with the PERAWATAN_PAGE screen. I removed it and the app compiles. Here is the AIA (without 80 images, all removed from assets):
LansiApp2.aia (67.0 KB)

Thank you for your help Anke. It means so much to me. I have a question. Does the asset you deleted have an impact on the build apk failure? because in the original file I tried to delete the screen PERAWATAN_PAGE but build apk remains erorr. its mean i must to delete the image too?

Share your blocks so that members can be able to troubleshoot the error.

I reduced all images using a batch command so that the app size is now only 3.4 MB (previously 24 MB): LansiApp_3.aia (3.2 MB)

No problem compiling the app (here):

1 Like