admin管理员组

文章数量:1291135

Problem Description

I am creating two React Native CLI (not Expo) apps using the following commands:

npx @react-native-community/cli@latest init AwesomeProject # created on Jan 21
npx @react-native-community/cli@latest init PasswordGen # created on Jan 22

Steps Taken

  1. Created two React Native apps:

    npx @react-native-community/cli@latest init AwesomeProject # created on Jan 21
    npx @react-native-community/cli@latest init PasswordGen # created on Jan 22
    
  2. Ran the Metro server and emulator commands for both projects:

    cd AwesomeProject
    
    npx react-native run-android
    
    npx react-native start
    
  3. Tried the same approach on a different computer, but the problem persists.


Expected Behavior

For both AwesomeProject and PasswordGen, I expected the Metro server to detect the apps and display the following options:

 i- open on iOS  
 a - open on Android  
 r - reload app(s) 
 d - open Dev Menu 
 j - open DevTools 

Actual Behavior

  • For AwesomeProject (created on Jan 21), the Metro server shows all options correctly:

    i- open on iOS  
    a - open on Android  
    r - reload app(s) 
    d - open Dev Menu 
    j - open DevTools 
    
  • For PasswordGen (created on Jan 22), the Metro server only shows limited options:

    r - reload app(s) 
    d - open Dev Menu 
    j - open DevTools 
    
  • The PasswordGen app is not detected as a complete app by the Metro server.

本文标签: androidIssue with Metro Server Detecting Only One React Native AppStack Overflow