This guide will help you set up and run PokéDex Fleek on your Android or iOS device. The app requires a physical device since camera features don’t work in simulators.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/soymatudev/Pokedex-Fleek/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have:Node.js and npm
Node.js and npm
Install Node.js 18 or later from nodejs.org. This includes npm automatically.Verify installation:
Terminal
Expo CLI
Expo CLI
Install Expo CLI globally:
Terminal
Physical Device
Physical Device
Important: You need a physical Android or iOS device. The app will not work in:
- Expo Go app (native modules required)
- Android emulators (camera issues)
- iOS Simulator (no camera support)
- USB cable for device connection
- Developer mode enabled on your device
Setup Steps
Install dependencies
Install all required npm packages:This installs key dependencies including:
react-native-vision-camerafor camera accessexpo-speechfor voice narrationreact-native-image-colorsfor color extraction@react-navigation/nativefor navigation
Generate native code
Run Expo prebuild to generate native Android/iOS projects:This creates:
Terminal
android/directory for Android native codeios/directory for iOS native code
You only need to run this once, unless you modify native dependencies in
package.json or app.json.Run on your device
Connect your device via USB and run the appropriate command:
- Android
- iOS
Enable USB debugging on your Android device, then:The app will:
Terminal
- Build the Android APK
- Install it on your connected device
- Launch the app automatically
Grant camera permissions
When the app launches for the first time:
- You’ll see a permission dialog asking for camera access
- Tap Allow or While Using the App
- The app needs camera access to scan and analyze objects
- Android: Go to Settings → Apps → Pokedex Fleek → Permissions → Camera → Allow
- iOS: Go to Settings → Privacy → Camera → Pokedex Fleek → Enable
Scan your first Pokémon
Now you’re ready to identify your first Pokémon!
- From the home screen, tap “Escáner de Campo” (Field Scanner)
- Point your camera at any colorful object
- Tap the Pokéball button at the bottom
- Wait for the color analysis (1-2 seconds)
- View the matched Pokémon with stats and voice narration
How the matching works
How the matching works
The app captures a photo, extracts the dominant color using
react-native-image-colors, converts it to HSL hue (0-360°), and finds the Pokémon with the closest matching color range.For example:- Red objects (0-30° hue) → Charmander, Flareon, Charmeleon
- Blue objects (180-240° hue) → Squirtle, Lapras, Vaporeon
- Yellow objects (40-70° hue) → Pikachu, Zapdos, Jolteon
Your First Scan
Here’s what happens when you scan an object:- Capture: The camera takes a photo when you tap the Pokéball button
- Extract:
react-native-image-colorsfinds the dominant color (platform-specific algorithm) - Convert: The
hexToHue()function converts the hex color to hue (0-360°) - Match: The app searches
POKEMON_DBfor Pokémon with matching color ranges - Display: Navigate to the details screen showing the matched Pokémon
- Narrate: Dexter voice reads the Pokédex entry in Spanish using
expo-speech
The color matching uses hue-based ranges rather than Euclidean distance in this implementation. Each Pokémon is mapped to a specific hue range (e.g., Bulbasaur: 90-150° for green).
Troubleshooting
Camera permission denied
Camera permission denied
If you see “Dexter necesita permisos de cámara”:Android:
- Open device Settings
- Go to Apps → Pokedex Fleek → Permissions
- Enable Camera permission
- Restart the app
- Open device Settings
- Go to Privacy → Camera
- Enable Pokedex Fleek
- Restart the app
Expo Go not supported
Expo Go not supported
You may see an error like “Invariant Violation: TurboModuleRegistry.getEnforcing(…) VisionCameraProxy”Solution: You cannot use Expo Go for this app. You must build a development build:Development builds include native modules like
react-native-vision-camera.Android build fails
Android build fails
Common Android build errors:Gradle build failed:
- Clear Gradle cache:
cd android && ./gradlew clean - Update Android SDK: Open Android Studio → SDK Manager → Update
- Enable USB debugging: Settings → Developer Options → USB Debugging
- Run
adb devicesto verify connection - Try a different USB cable (some are charge-only)
iOS build fails
iOS build fails
Common iOS build errors:Code signing error:
- Open
ios/PokedexFleek.xcworkspacein Xcode - Select your development team in Signing & Capabilities
- Change bundle identifier if needed
Terminal
Black camera screen
Black camera screen
If the camera view is black:
- Check permissions: Verify camera access in device settings
- Restart app: Close and reopen the app completely
- Rebuild: Sometimes native changes need a rebuild
- Check device: Test camera with native camera app to ensure hardware works
Next Steps
Now that you have the app running, explore more:Detailed Installation
Platform-specific setup guides for Android Studio and Xcode
Understanding the Tech
Learn about the feature-based architecture and data flow
Camera Scanner
Deep dive into how the camera scanning and color extraction works
Development Guide
Set up your local development environment and debugging tools