I have configured flutter on my Linux Mint and I have downloaded the android command line tools instead of Android Studio. I have also updated the gradle and commandline-tools path on my Linux Mint. Now I want to install the app on my android smartphone and test. How can I do that?
You can type this in your terminal in your project directory to get the release apk for your project
flutter build apk --release
The release apk file will be in build>app>outputs>flutter-apk>app-release.apk
If you want to debug the app, then you can connect your android phone to your pc and then run this command in the terminal:
flutter run
and then select your android device from the options to debug your app
Run Flutter doctor -v
to check for any issues (You may have to accept android-licences with flutter doctor --android-licenses
).
Connect your android device (Debugging mode should be enabled in the developer options) with USB
You can see connected device in VSCode at bottom-right corner,select your device
Press F5 to run or use " Flutter run
" command
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.