Reference https://flutter.dev/docs/deployment/android Making release build to the device flutter run --release -d <YourDeviceID from adb devices> Building app bundles with code obfuscations flutter build appbundle --obfuscate --split-debug-info=/debug_info Building universal apk flutter build apk --obfuscate --split-debug-info=/debug_info Building apk for 32bit flutter build apk --target-platform=android-arm --obfuscate --split-debug-info=/debug_info Building apk for 64bit flutter build apk --target-platform=android-arm64 --obfuscate --split-debug-info=/debug_info Spliting apk flutter build apk --split-per-abi --obfuscate --split-debug-info=/debug_info Building for web Switch to beta channel flutter channel beta Note : If the blank screen error occur, go to dev channel flutter channel dev Upgrade to get the latest build flutter upgrade Enable web support flutter config --enable-web Check whether the required chrome debugger is instal...
If you're calling to another URL from your flutter app, you need to manually allows the origin domains to avoid CORS policy for extra security. This is time consuming if you're setting up the policy on your production API server. So how do we solve it? We can solve it by two methods. 1- Allow your trusted domain from your development API server 2 - Run chrome with disable web security The second one is the easiest method so we'll start with the second method unless your app is already running on production server. Run chrome with disable web security Right click on desktop, add new shortcut. Add the target as "[PATH_TO_CHROME]\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp. Click OK. Make sure you run the created shortcut with admin rights. Allow your trusted domain from your development API server
Comments
Post a Comment