森口万太郎
森口万太郎

Reputation: 895

An error occurs when obfuscating the Flutter app

I'm about to release my Flutter app.

https://flutter.dev/docs/deployment/obfuscate

I read the above page and ran the following command in a terminal, but I get an error.

flutter build appbundle --obfuscate --split-debug-info /projectName/odf

↓error contents

* Where:                                                                
Script '/Users/userno1/dev2/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1035
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:compileFlutterBuildRelease'.            
> Process 'command '/Users/userno1/dev2/flutter/bin/flutter'' finished with non-zero exit value 1

flutter build appbundle

With the above command, the release build was successful.

I'd like to somehow obfuscate the source code, which is the result of my efforts.
Is there any good way?

Upvotes: 1

Views: 1167

Answers (1)

ישו אוהב אותך
ישו אוהב אותך

Reputation: 29783

You're incorrectly using the command:

flutter build appbundle --obfuscate --split-debug-info /projectName/odf

because you're missing the = after --split-debug-info

Try the following command:

flutter build appbundle --obfuscate --split-debug-info=your_debug_info_directory

Where your_debug_info_folder is a directory in your project

Upvotes: 2

Related Questions