I want help configuring the apk file
I see this message
> flutter build appbundle --obfuscate
"--obfuscate" can only be used in combination with "--split-debug-info"
Related
I'm storing some settings in String.fromEnvironment('CONFIG_EX'), when I run the app in Debug or Profile mode everything works normally, but now I launched it on the PlayStore in Open Test and it's returning a 403 error and I realized that the compilation generated the empty variables.
it's more or less like this in my run settings:
--dart-define=CONFIG_EX=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm generating my appbundle this way:
flutter build appbundle
Is there any way to generate this appbundle with the run settings?
You can extend build commands with extra parameters.
Android:
flutter build appbundle --dart-define=CONFIG_EX=xxx
iOS:
flutter build ios --dart-define=CONFIG_EX=xxx
i'm having some problems while compiling my flutter app for Android.. I've only 3 assets and a couple packages added, but when I try to compile, I got this:
√ Built build\app\outputs\flutter-apk\app-release.apk (158.3MB).
Any idea?
Flutter build log (running flutter build apk)
PS C:\\Users\\Admin\\Desktop\\Fictix\\Don't Touch This\\app\\dtt_app\> flutter build apk
Building with sound null safety
First of all, you can try clearing the cache via terminal.
flutter clean
This command will delete few temporary folders, specially "build/", ".dart_tools/" and ".packages/".
You can also run the following code from the terminal before the build phase of your application.
flutter build appbundle --target-platform android-arm,android-arm64
Of course, it is not a 100% method, but it can work in reducing your application size.
You can follow the steps below to clear it by Android Studio.
Tools > Flutter > Flutter Clean
Make your app with no sound null safety
From Terminal Run This Command
flutter build apk --split-per-abi --no-sound-null-safety
or
flutter build apk --release --no-sound-null-safety
If your problem still persists
// #2.9 in the top remove the parameter from Const app_name();
Run --no-sound-null-safety from terminal
Edit your Configure File and write in Additional run args:- --no-sound-null-safety
I have a flutter app and its working fine in debug mode but when i run flutter build apk command for android apk it shows the following error.
The error is cannot run with sound null safety.
Error:
C:\Users\RAILO\flutter\bin\flutter.bat --no-color build apk
Building with sound null safety
Running Gradle task 'assembleRelease'...
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flutter_swiper
- package:flutter_page_indicator
- package:transformer_page_view
For solutions, see https://dart.dev/go/unsound-null-safety
FAILURE: Build failed with an exception.
Add this line on top of main.dart
// #dart=2.9
then run $flutter clean && flutter pub get
you can try this command also.
flutter build apk --release --no-sound-null-safety
I've been trying to build an apk for my app but its failing and I don't understand why
this is what is shwoing
i tried to build using this command that was given to me in comments
flutter build apk --no-tree-shake-icons
but its showing me this new error now
Try add this when build your apk --no-tree-shake-icons
Generally, for errors that seem odd like this, running flutter clean then flutter pub get in the terminal helps.
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?
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