21

I'm trying to upload my bundle Flutter app to Google Play from my Mac, but I'm getting a warning about adding "debug symbols":

This App Bundle contains native code, and you've not uploaded debug symbols. We recommend you upload a symbol file to make your crashes and ANRs easier to analyze and debug.

According to this answer, I need to zip the three folders and upload it as a "debug symbols".

However, I'm getting the above error when trying to upload the compressed files:

The native debug symbols contain an invalid directory __MACOSX. Only Android ABIs are supported.

What is the problem? What should I do?

3 Answers 3

69

I have solved the issue by deleting all __MACOSX folders from my zip.

After compressing your arm64-v8a, armeabi-v7a and x86_64 folders, run the above command to get rid of the Mac __MACOSX files:

zip -d Archive.zip "__MACOSX*" 

Then you can upload the .zip symbol file to Google Play Console.

Sign up to request clarification or add additional context in comments.

3 Comments

This worked for me. I'm using Gradle 8.2 in my Flutter 3 project and I've tried all solutions from internet to automate a script in build.gradle and to avoid to do this task manually. But there is no solution for the moment and the old script is not working anymore. I mean this: stackoverflow.com/questions/63373245/…
To perform that command, point your terminal to the projects lib folder [ProjectName/build/app/intermediats/merged_native_libs/release/out/lib]
Also for removing the DS_Store file you have to use this: zip -d Archive.zip "*/.DS_Store"
2

When you compress folders using MacOS Archive utility than it will include _MACOSX file as well, so there are two ways to handle the situation:

1- Delete _MACOSX folder that is hidden.

2- Download WinZip and Compress using it.

Comments

1

Unzip the current archive Archive.zip and then delete your Archive.zip

Delete the __MACOSX directory using the  below command:

 rm -rf Archive/__MACOSX 

Re-zip the cleaned directory using the  below command:

 cd Archive 
zip -r ../Archive.zip . 

Note: Do not use finder options to re-zip otherwise error will be not removed.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.