From a73f736d9219a448793f73541d2c82227f8eb1af Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 24 May 2022 07:55:40 -0700 Subject: [PATCH] Launch emulator error message Summary: It's not obvious for non-mobile developers how to fix it when there are no emulators available. Adding a quick section in the troubleshooting guide and linking to it. Changelog: Add link to troubleshooting page when no emulators are available. Reviewed By: nikoant Differential Revision: D36599925 fbshipit-source-id: f3a1e79e07209e34b66176102c85e7797292978c --- .../src/sandy-chrome/appinspect/LaunchEmulator.tsx | 12 +++++++++++- .../appinspect/__tests__/LaunchEmulator.spec.tsx | 9 ++++++++- docs/getting-started/troubleshooting/general.mdx | 10 ++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx index cc952bf55..e07044a05 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/LaunchEmulator.tsx @@ -27,6 +27,7 @@ import {Provider} from 'react-redux'; import {IOSDeviceParams} from 'flipper-common'; import {getRenderHostInstance} from '../../RenderHost'; import SettingsSheet from '../../chrome/SettingsSheet'; +import {Link} from '../../ui'; const COLD_BOOT = 'cold-boot'; @@ -190,7 +191,16 @@ export const LaunchEmulatorDialog = withTrackingScope( <> {waitingForResults && } {!waitingForResults && items.length === 0 && ( - + + No emulators available.
+ + Learn more + + + } + /> )} ); diff --git a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx index 9ac1f833f..9171ea06e 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/appinspect/__tests__/LaunchEmulator.spec.tsx @@ -47,7 +47,14 @@ test('Can render and launch android apps - no emulators', async () => {
- No emulators available + No emulators available. +
+ + Learn more +
`); }); diff --git a/docs/getting-started/troubleshooting/general.mdx b/docs/getting-started/troubleshooting/general.mdx index 8ffde71db..56fb5c2c4 100644 --- a/docs/getting-started/troubleshooting/general.mdx +++ b/docs/getting-started/troubleshooting/general.mdx @@ -41,3 +41,13 @@ The following devices are known to be incompatible or face issues with Flipper: * Some Samsung devices ([Tracking Issue](https://github.com/facebook/flipper/issues/92)). * Genymotion emulators on Android 8+ are reported to have issues. + +## I see "No emulators available" + +For **Android**, you first need to set up Android Virtual Devices, called AVDs. You +can do this in Android Studio using the [Virtual Device Manager](https://developer.android.com/studio/run/managing-avds). + +For **iOS**, after installing Xcode, you should have a default set of simulators set up. However, +it is possible to delete them and there is no easy way to restore them afterwards. You can use +[a script like this one](https://gist.github.com/dynamicguy/e8756a9f0f50af86d6e746d4b1ab6a09) to +recreate the default set. \ No newline at end of file