Unmatched Route - Expo route, Android
17:25 11 Mar 2024

I got a same question as https://www.reddit.com/r/reactnative/comments/14vtimp/unmatched_route_error_on_a_route_that_does_exist/. However, the following solutions seem not working on my scenario. I got "Unmatched Route" only while I was trying to open the Android with npm start. Web working fine, which is a bit odd.

As my understanding, in expo structure, it will looks at _layout.js file, which I call out the Root Navigator. Again, web version work correctly, but got Unmatched Route while opening Android in expo app. I

I have tried to put _layout.js file under both app and outside app folder, but still doesn't work. I am thinking maybe I need to add path="app/(tabs)/_layour.js" somewhere, but I thought I already have RootNavigator.

I have a structure as:

app
├── (tabs)
 └──_layout.js
├── redux
├── profile
└── mapping
components
app.json

In my _layout.js file. I do

import RootNavigator from '../../components/RootNavigator';
export default function App() {
  return (
    
          
    
  );
}

Root Navigator

export default function RootNavigator() {
  return (
    
      
        
      
    
  );
}

Node version: 18.12.1

Expo version: 50.0.11

Any suggestions are welcome. Thank you.

android react-native expo