I couldn't install flutter app on my android phone. How can I do it? I can run by usb debugging However I want to install it on my phone. Can someone help me please?
CodePudding user response:
You need to build the app to get the apk. For building apk use this command in console: flutter build apk
and if you want to build your apk in smaller size then use this command in console: flutter build apk --split-per-abi
.
After building apk you will find it in [project]\build\app\outputs\flutter-apk\app-armeabi-v7a-release.apk
here.
If you don't want to build apk and just want to test your app you can run it in profile mode by using this command in console: flutter run --profile
.
CodePudding user response:
If you use IntelliJ Idea (it should also work on Android Studio), you can go to
Build -> Flutter -> Build APK, (in the menu bar)
and after building, your apk will appear in
build/app/outputs/flutter-apk/app-release.apk,
just send the file to your phone and install, your phone will probably tell you not do download cause it isn't checked and secured or something, just ignore and install anyway
CodePudding user response:
- Connect your Android device to your computer with a USB cable.
- Enter cd [project].
- Run flutter install.
Source: here