Build Variants
BBPlayer uses different build variants for various stages of development and release. These are configured ineas.json in the mobile app directory.
BBPlayer primarily targets Android. iOS builds are not actively maintained and may not compile successfully.
EAS Build Profiles
Expo Application Services (EAS) manages build configurations:| Profile | Purpose | Distribution | ABI Filters | Channel |
|---|---|---|---|---|
dev | Development builds | Internal | arm64-v8a | development |
preview | Internal testing | Internal | arm64-v8a | preview |
prod-v8a | Production (64-bit) | Public | arm64-v8a | production |
prod-universal | Universal APK | Public | All ABIs | production |
prod-ci | CI/CD builds | Public | Auto | production |
Understanding ABI Filters
ABI (Application Binary Interface) determines which CPU architectures the APK supports:arm64-v8a- 64-bit ARM (most modern devices) - smallest file sizearmeabi-v7a- 32-bit ARM (older devices)x86- 32-bit x86 (emulators, rare devices)x86_64- 64-bit x86 (some tablets, emulators)
Local Development Builds
Android Debug Build
Build and run a debug APK on a connected device or emulator:- Runs
expo run:androidwith Rozenite metro plugins enabled - Builds a debug APK
- Installs it on your device/emulator
- Starts the Metro bundler
Debug builds include development tools and are not optimized for performance. Use them only during development.
Production Builds with EAS
Prerequisites
Build Production APK (arm64-v8a)
Build an optimized APK for 64-bit ARM devices:APP_VARIANT=productionABI_FILTERS=arm64-v8a
Build Universal APK
Build an APK supporting all architectures:APP_VARIANT=productionABI_FILTERS=armeabi-v7a,arm64-v8a,x86,x86_64
Build Preview Version
Create an internal preview build for testing:- Include production optimizations
- Have internal distribution settings
- Use the preview update channel
Local Production Builds
You can build production APKs locally without EAS:iOS Builds (Experimental)
If you want to attempt an iOS build:Prerequisites
- macOS with Xcode 15+
- Apple Developer account
- Provisioning profiles configured
Build iOS
iOS builds are not regularly tested. Expect compilation errors and platform-specific issues.
Build Configuration Details
App Variants
TheAPP_VARIANT environment variable controls build behavior:
Metro Bundler Plugins
The mobile app uses Rozenite plugins for enhanced development:- MMKV plugin - Storage inspection
- TanStack Query plugin - Query devtools
- Require profiler - Module load time profiling
Signing and Release
Generate Keystore
For manual signing, create a keystore:Configure Gradle
Add signing configuration toapps/mobile/android/app/build.gradle:
Continuous Integration
Theprod-ci profile is designed for CI/CD pipelines:
Troubleshooting
Build Fails with “Out of Memory”
Increase Gradle memory inapps/mobile/android/gradle.properties:
ABI Filter Issues
If the app crashes on certain devices, ensure the correct ABI is included:Metro Bundler Errors
Clear Metro cache:Native Module Build Errors
Rebuild native modules:Distribution
Once you have a signed APK:- GitHub Releases - Upload to GitHub for direct downloads
- Google Play - Submit via Play Console
- Alternative Stores - F-Droid, APKPure, etc.
Next Steps
Development Setup
Return to environment setup guide
Project Structure
Understand the codebase organization