Android Studio Emulator - Expo Documentation

文章推薦指數: 80 %
投票人數:10人

Step 1: Set up Android Studio's tools · Download and install Android Studio 3.0+. · Select "Standard" for the "Install Type" inside the wizard. · Inside Android ... FundamentalsExpoCLIUsinglibrariesViewinglogsDevelopmentandProductioniOSSimulatorAndroidStudioEmulatorDebuggingConfigurationwithapp.json/app.config.jsPublishingupdatesUpgradingExpoSDKDevelopingforWebSnack:aplaygroundinyourbrowserAddingcustomnativecodeGlossaryoftermsAlreadyusedReactNative?CommondevelopmenterrorsDistributingYourAppOverviewDeployingtoAppStoresReleasechannelsAdvancedreleasechannelsRuntimeVersionsHostingUpdatesonYourServersUploadingAppstotheAppleAppStoreandGooglePlayAppTransfersSecurityOptimizingUpdatesPublishingWebsitesAssortedGuidesAssetsFontsIconsRouting&NavigationPermissionsAppIconsCreateaSplashScreenConfiguringtheStatusBarLightandDarkmodesTypeScriptAuthenticationUserInterfaceComponentLibrariesAssetCachingEnvironmentvariablesConfiguringUpdatesCustomizingMetroCustomizingWebpackOfflineSupportProgressiveWebAppsWebPerformanceDelayingYourCodeErrorHandlingTestingwithJestCraftingEducationalMaterialsHowExpoWorksLinkingRunningintheBrowserSettingupContinuousIntegrationTestingonphysicaldevicesTroubleshootingProxiesUsingFirebaseUsingSentryUsingBugsnagUsingClojureScriptUsingGraphQLUsingStyledComponentsConfigPluginsWorkingwithMonoreposNativeFirebaseSharingpreviewreleasesUsingElectronUsingGatsbyUsingHermesUsingNext.jsUsingPreactExpoModulesOverviewModuleAPIAndroidLifecycleListenersiOSAppDelegateSubscribersModuleConfigExpoAccountsAccountTypesTwo-FactorAuthenticationProgrammaticAccessWorkingTogetherBareWorkflowWalkthroughUpandRunningUsinglibrariesExistingAppsInstallingExpomodulesInstallingexpo-updatesSupportedAPIsUsingExpoGoUsingExpoforwebMigratingfromExpoKitUpdatingyourAppErrorRecoveryPushNotificationsOverviewSetupSendingNotificationswithExpo'sPushAPISendingNotificationswithAPNs&FCMReceivingNotificationsUsingFCMTroubleshootingandFAQClassicServicesBuildingStandaloneAppsBuildingStandaloneAppsonYourCIUIProgrammingSettingacomponent'sbackgroundimageImplementingacheckboxforExpoandReactNativeappsStackingviewswithzIndexUsingSVGsHowtodisplayapopuptoastStylingbuttonsRegulatoryComplianceTechnicalSpecsDeprecatedAndroidStudioEmulatorIfyoudon'thaveanAndroiddeviceavailabletotestwith,werecommendusingthedefaultemulatorthatcomeswithAndroidStudio.Ifyourunintoanyproblemssettingitup,followthestepsinthisguide.Step1:SetupAndroidStudio'stoolsDownloadandinstallAndroidStudio3.0+.Select"Standard"forthe"InstallType"insidethewizard.InsideAndroidStudio,gotoPreferences>Appearance&Behavior>SystemSettings>AndroidSDK.Clickonthe"SDKTools"tabandmakesureyouhaveatleastoneversionofthe"AndroidSDKBuild-Tools"installed.Copyorrememberthepathlistedintheboxthatsays"AndroidSDKLocation."IfyouareonmacOSorLinux,addanenvironmentvariablepointingtotheAndroidSDKlocationin~/.bash_profile(or~/.zshenvifyouuseZsh)-eg.exportANDROID_SDK=/your/path/here.CopyandpastethesetwolinestodothisautomaticallyforBashandZsh:[-d"$HOME/Library/Android/sdk"]&&ANDROID_SDK=$HOME/Library/Android/sdk||ANDROID_SDK=$HOME/Android/Sdk echo"exportANDROID_SDK=$ANDROID_SDK">>~/`[[$SHELL==*"zsh"]]&&echo'.zshenv'||echo'.bash_profile'` OnmacOS,youwillalsoneedtoaddplatform-toolstoyour~/.bash_profile(or~/.zshenvifyouuseZsh)-eg.exportPATH=/your/path/here:$PATH.CopyandpastethislinetodothisautomaticallyforBashandZsh:echo"exportPATH=$HOME/Library/Android/sdk/platform-tools:\$PATH">>~/`[[$SHELL==*"zsh"]]&&echo'.zshenv'||echo'.bash_profile'` Reloadthepathenvironmentvariablesbyrunning:source~/`[[$SHELL==*"zsh"]]&&echo'.zshenv'||echo'.bash_profile'` Finally,makesurethatyoucanrunadbfromyourterminal.Step2:SetupavirtualdeviceOntheAndroidStudiomainscreen,click"MoreActions",then"VirtualDeviceManager"inthedropdown.Ifyoualreadyhaveaproject,thenthemenuwillshowupunderthethreedotsmenuinthetoprightcornerofthewindow.Pressthe"Createdevice"button.Choosethetypeofhardwareyou'dliketoemulate.Werecommendtestingagainstavarietyofdevices,butifyou'reunsurewheretostart,thenewestdeviceinthePixellinecouldbeagoodchoice.SelectanOSversiontoloadontheemulator(probablyoneofthesystemimagesinthe"Recommended"tab),anddownloadtheimage.Changeanyothersettingsyou'dlike,andpress"Finish"tocreatethevirtualdevice.YoucannowrunthisdeviceanytimebypressingthePlaybuttonintheAVDManagerwindow.MultipleadbversionsHavingmultipleadbversionsonyoursystemcanresultintheerroradbserverversion(xx)doesn'tmatchthisclient(xx);killing...Thisisbecausetheadbversiononyoursystemisdifferentfromtheadbversionontheandroidsdkplatform-tools.Opentheterminalandchecktheadbversiononthesystem:adbversion AndfromtheAndroidSDKplatform-tooldirectory:cd~/Library/Android/sdk/platform-tools ./adbversion CopyadbfromAndroidSDKdirectorytousr/bindirectory:sudocp~/Library/Android/sdk/platform-tools/adb/usr/bin Step1:SetupAndroidStudio'stoolsStep2:Setupavirtualdevice



請為這篇文章評分?