Reputation: 1
Greeting. I am new to flutter, and developing using VS Code on Windows 10. Both flutter and VS code are of latest versions.
Lately, I noticed something rather strange. When I built the Android apk using the flutter CLI (flutter build apk --debug / --release), the output apk seems to always be about 10MB+ larger compared to those built within VS Code (through the debug & release configurations in launch.json).
Here's the sample apk size built in a basic flutter project created by 'flutter create':
Builds by VS Code:
-rw-r--r-- 1 teeka 197609 57557589 Aug 8 14:45 ./build/app/outputs/flutter-apk/app-debug.apk
-rw-r--r-- 1 teeka 197609 6586727 Aug 8 14:43 ./build/app/outputs/flutter-apk/app-release.apkBuilds by 'flutter build apk':
-rw-r--r-- 1 teeka 197609 70762755 Aug 8 14:45 ./build/app/outputs/flutter-apk/app-debug.apk
-rw-r--r-- 1 teeka 197609 16802483 Aug 8 14:47 ./build/app/outputs/flutter-apk/app-release.apk
Appreciate if anyone can help offer some clarification on the discrepancy. Thanks in advance.
Naturally, we all like a smaller APK size, but I wondering if there's any string attached.
Thanks.
Upvotes: 0
Views: 140
Reputation: 1
Here's the content of launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "flutter_new_project",
"request": "launch",
"type": "dart"
},
{
"name": "flutter_new_project (debug mode)",
"request": "launch",
"type": "dart",
"flutterMode": "debug"
},
{
"name": "flutter_new_project (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
}
]
}
Upvotes: 0