We have Flutter driver tests running locally with a command like:
flutter drive --target=test_driver/app.dart --driver=test_driver/test/login_test.dart --flavor dev --no-start-paused
And having an Android device plugged in to the computer.
Now we want to run these tests remotely. We are trying to figure out which devices in the cloud provider is the best for running flutter driver tests.
We tried following the guide on https://flutter.dev/docs/testing/integration-tests and run them on Firebase Testlab but we couldnt make it work, or it is not possible with Flutter driver tests.
Which devices in the cloud provider we should choose for running flutter driver tests? We have got Bitrise as CI solution.
For Android, you can use the AVD Manager step to create an Android emulator and add Wait for Android emulator step to wait for the emulator to finish the boot.
Related
I want to run Flutter but the emulation I installed is not available in vs code. When I run the emulator, the emulator comes up, but the program does not run in it, only the programs run in Android Studio run in it.
I suggest you delete your emulator from avd folder and then create one again.
Also, try to run the project after running the emulator in android studio. Completely delete the folder of the installed emulator.
The emulator's folder is generally: USER/USERNAME/.android/avd
I installed the flutter and dart plugins on Android Studio, already installed SDK and AVD for the Android emulator. But the program still runs on chrome
If you are using VS Code, you can select the target device by using the status bar changer:
That will open up the list of connected devices in the command palette you can pick from.
Launch your Android emulator, run flutter devices to get the id of the emulator device. Then, you can run flutter run -d [emulator_id] to launch the Flutter application on the targeted device.
To see available emulators run this command:
flutter emulators
Then copy the name of emulator from there and enter this command:
flutter emulators --launch EmulatorNameHere
Now when the emulator ready and running:
flutter run
I tried creating a new flutter project in Visual Studio Code, but for whatever reason it now has a default device of Google Chrome every time I try to run it. I don't want to run Flutter in web environments whatsoever: is there any way I can disable this?
Run the following command to disable web completely.
flutter config --no-enable-web
Then restart your editor if necessary.
First, run your emulator from the AVD manager or connect your physical device while it's on debugging mode, if it's an android device, then choose the device you want to run from the flutter device selection option
I have my flutter app built and running on macOS using the following command.
flutter run
This is great.
Now, I want to run my app on an Android device. It has developer mode enabled and getting recognised when I run adb devices. I have also run other apps on my Android device. So, I am sure the android device is well set for android development.
But now when execute flutter run, my app still runs on macOS instead of Android device. I did a flutter build apk which built my app for android. But, flutter run still runs on Mac instead of Android.
Isn't there a flutter run command to run the build on Android specifically?
flutter -v -d your_android_device run selects the target device to run on.
Check that your device is recognized using flutter devices (or flutter doctor -v). If so, you can specify the device id you using flutter run -d <deviceID>.
flutter -d 54XXXXXX35130ebefd38f run
On this website (https://ionicframework.com/docs/intro/deploying/) I read that I should give this command on the command prompt: ionic cordova run android --prod --release
I tried it but it only tried to start the app on an emulator (I have some problems with it, so it didn't actually start the emulator). Does this command also create a file I can put on my mobile and install the app? I don't want to put the app on Google play, just on my mobile.
I tried putting the android-debug.apk on my mobile and running it but my mobile couldn't install it (.../platforms/android/build/outputs/apk/android-debug.apk)
I'm not trying to test the app on my mobile, I'm trying to install it.
If you want to deploy the apk to your device
ionic cordova run android --device is indeed correct. (try adding --device)
You only need --prod --release when building for production (longer buildtime).
Before running (= building, installing and starting your app) check if your device has USB-debugging enabled. You can check if your device is connected by running adb devices. Since the run command includes building, yes run should create a apk for you.
As you said you also could install the apk manually. Here make sure to use the correct apk. android-debug.apk is the development build (no --release tag) and since your trying to run a production one (--release) you are looking for android-release.apk or android-release-unsigned.apk.
go to settings -> security in your phone then check Unknown sources (Allow installation of apps from sources other than the play store) and try to put the android-debug.apk again. this should work