Metadata loss when renaming aia to zip to aia again

Hello everybody,
Recently I was planning to work on a new tool for App Inventor and other distros, for testing before working on the project itself I downloaded an aia file TicTacToe.aia, and renamed it to TicTacToe.zip and extracted the zip file. Then I renamed the folder and compressed it to another zip file TicTac.zip and then again renamed it to TicTac.aia, when I tried to import it I got this error

Screenshot_2024-08-04-18-31-57-32_40deb401b9ffe8e1df2f1cc5ba480b12

Selected project is not a project source file! Project source files are aia files


What I personally feel about the reason behind this behaviour is metadata loss while renaming the files, because when I again renamed the original TicTacToe.zip to TicTacToe.aia then it was imported perfectly.


Now I would like to know the issue behind this issue.


Thanks in advance :upside_down_face:

There are multiple compression formats out there, I anticipate App Inventor expects a specific format.

Quickly ran a python script to check compressor format applied on .aia files. It uses "no compression" format. So probably the system expects "no compression" format, but you could be given it a "compressed" format.

So when you try to recreate the .aia file, try with no compression format.

1 Like

Hmmmm, I need to check that
Will update after checking :smiley:

After every one on this board switched to 7zip for their aia file surgery, compatibility complaints dropped significantly.

I appreciate your point @ABG , but as I told I'm working on making a new tool for the community(users) hence I need to do it from coding only(Dart Language), hence I believe 7zip isn't a better option particularly in my case...

Oops, I missed the new tool part.

When you get it working, tell us so I can add it to my (our) list.

1 Like

For sure, making that tool for community only :slight_smile:

Anyways is there any idea about the issue I'm having :sweat_smile:

Did you check the metadata of your renamed aia? I believe this is the problem as you have shown that retaining the name works OK.

To be very Frank idk how to do that from android, as I'm not having the pc right now (I'm in hostels actually)

Your problem is here:


1 Like

But if I rename that to zip back I didn't get a subfolder like you got pick. But still to confirm wait for a little I'll try checking and report it back

By the way, there is no reason to rename .aia files to .zip, as they are already ZIP files.

Ummm, that's also a fine option but I'm in doubt that would dart libraries like archive will be able to extract that contents of the aia, won't they report some errors

His problem is that he...
"...renamed the folder and compressed it to another zip file TicTac.zip and then again renamed it to TicTac.aia"

Thanks Anke, I just found that this was what causing the issue

1 Like

What was the issue, subfolder in the renamed zip, or simply renaming to something other than the original name?

Actually when I renamed my original aia's extension to .zip then I extracted it and changed the name of the extracted folder to xyz from abc and after again compressing it to .zip it made a subfolder of the same name inside the zip which was basically the aia's source. The issue is solved by compressing the subfolders like assets, src and youngandroidproject not the parent folder :file_folder:

1 Like

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