25

In the command below, how to use --split-debug-info=/<project-name>/<directory>

flutter build apk --obfuscate --split-debug-info=/<project-name>/<directory>

When I declare project-name & directory path then the path contains nothing after build.

The --split-debug-info flag specifies the directory where Flutter can output debug files. This command generates a symbol map.

So the directory defined, but where are the resulted symbol maps?

5 Answers 5

45

A reasonable value would be:

--split-debug-info=build/app/outputs/symbols

This puts it into a logical place near where the actual result files would appear, anyway.

0
16

First of all, make sure you are using a version of Flutter framework >= 1.16.2, you can check it by running:

flutter --version

And if it's not the case, you can upgrade the Flutter framework by running:

flutter upgrade

Then, in order to generate the symbol map files when you run the flutter build command, you can use the command like this:

 flutter build apk --obfuscate --split-debug-info=some_parent_directory/some_child_directory

Note that some_parent_directory and some_child_directory are arbitrary names that you can replace for whatever you want.

Also note that there's no slash (/) symbol at the beggining of the right side of the equals (=) symbol of the --split-debug-info=some_parent_directory/some_child_directory part of the command.

For the example above, after the command finishes, you can find a some_parent_directory directory under your project's root directory, which contains another directory called some_child_directory which finally contains the symbol map files:

  • app.android-arm.symbols
  • app.android-arm64.symbols
  • app.android-x64.symbols
11

The ideal directory would be : build/app/outputs/symbols

So :

--split-debug-info=build/app/outputs/symbols

The /<directory> can also be replaced with the relative path of the project or exact location.

Ex: ./ProjectFolderName/output

It will create ProjectFolderName folder inside your project directory

or

/Users/apple/Desktop/items/example

It will be specific path of folder

1

It is recommended if you are going to upload it on Play Store.

flutter build appbundle --target-platform android-arm,android-arm64,android-x64
0

If you use different targets and flavors, place the flavor last, other way is not obfuscating for some reason

flutter build apk -t lib/flavors/company_a/prod.dart --obfuscate --split-debug-info=obfuscate/symbols --flavor=company_a_prod

That way is not working for me :

flutter build apk -t lib/flavors/company_a/prod.dart --flavor=company_a_prod release --obfuscate --split-debug-info=obfuscate/symbols

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.