How to Run the Android App
After configuring the base URL, follow these steps to build and run your application on an emulator or a physical device.
Step 1: Open and Select a Target Device
- Open Android Studio and load your project
- At the top of the Android Studio window, click on the Run/Debug Configurations menu
- Select an Emulator (e.g., Pixel 7) or your connected Physical Device
Step 2: Build and Run
- Click the Run button (the "Play" icon) in the top right, or press
Shift + F10 - Android Studio will begin compiling the source code and linking dependencies
- Once the build is successful, the app will launch automatically on the selected device
Step 3: Verify the Application
- Ensure your web storefront server is running and accessible from the device
- When the app opens, it should load your storefront home page
- Test key functionalities to ensure everything is working:
- Catalog: Browse products and categories
- Cart: Add items to the cart and verify the count
- Native Bridge: Verify that native toasts or navigation events are firing correctly
Troubleshooting Common Issues
❌ App Fails to Load URL
- Verify that the base URL in your code exactly matches your active storefront URL
- If using a local server, ensure your computer and device are on the same Wi-Fi network
- Check if the URL is accessible via a browser on the same device
❌ Build Errors
- Clean Project: Go to Build → Clean Project
- Rebuild Project: Go to Build → Rebuild Project
- Ensure you are using the latest stable version of Android Studio
❌ Connection Refused
- If testing locally, use your computer's local IP address (e.g.,
http://192.168.1.5:3000) instead oflocalhost - For emulator, use
10.0.2.2to access host machine
