flutter build apk --release
failing with error :
Script '/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102
- What went wrong: Execution failed for task ':app:compileFlutterBuildRelease'. Process 'command '/flutter/bin/flutter'' finished with non-zero exit value 1
But flutter pub get, flutter run is working. I've tried doing flutter clean, checked all pubspec.yaml dependencies, updated android build.gradle minimum version to satisfy dependency requirements.
Project environment: sdk: ">=2.16.1 <3.0.0" Flutter version: 2.10.2(stable channel)
Has anyone faced anything such? If so what could be some possible solutions to this issue?
CodePudding user response:
This link has suggested 3 steps to solve the problem:
Step 1. flutter build apk --debug
Step 2. flutter build apk --profile
Step 3. flutter build apk --release
If it doesn't help you, you can try this solution too.
CodePudding user response:
you need clean your build in file android with cd android
& gradlew clean
Then, cd ..
& flutter build apk --release
or
flutter build apk --release -vv