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?
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.
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:
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
It is recommended if you are going to upload it on Play Store.
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With