flutter run build apk –release
However, I am encountering the following error:
Target file "build" not found.
I expected the APK to be built, but instead, the command fails.
Here are the details of my environment:
Flutter version: 3.24.1
Dart version:Dart 3.5.1
OS: Windows 11
I have tried running flutter clean and flutter pub get before running the command again, but the issue persists.
Am I using the wrong command or missing a configuration step? Any help would be appreciated.
3
Answers
You can simply use
flutter build apk
also check if you have internet added on your AndroidManifest file
Open the file "android/app/src/main/AndroidManifest.xml" and add the proper user-permission:
Long story short, yes, you are using wrong command đŸ™‚ For your use case it is
flutter build apk
. No need forrun
since it’s another command and no need for--release
since it’s default mode when building apk.Good luck!
use
flutter build apk --release
don’t use as flutter run build apk –release won’t work.now try to build apk