This is your complete guide to transitioning from Expo to full native Android Studio development.
✅ Native Android Project Generated
- Full Android project structure in
/android/directory - Gradle build system configured and ready
- All necessary gradle files (build.gradle, settings.gradle, gradle.properties)
- ProGuard rules configured for production builds
- AndroidManifest.xml with all required permissions and configurations
✅ Native Source Code
MainActivity.kt— Main activity (entry point)MainApplication.kt— Application initialization- All React Native integration code
✅ Build Configuration
- Debug and Release build types
- Hermes engine enabled for better performance
- New Architecture (Fabric + TurboModules) enabled
- Edge-to-edge display support
- WebP and GIF image support
✅ Documentation
ANDROID_STUDIO_SETUP.md— Step-by-step setup guideANDROID_DEVELOPMENT.md— Development workflow and debuggingANDROID_PROJECT_STRUCTURE.md— Directory structure and file reference
Download from: https://developer.android.com/studio
- Launch Android Studio
- Click File → Open
- Navigate to
/home/ubuntu/mcp-hub - Click Open
- Wait for Gradle sync to complete (2-5 minutes)
Debug Build (for testing):
cd /home/ubuntu/mcp-hub/android
./gradlew assembleDebugAPK will be in: android/app/build/outputs/apk/debug/app-debug.apk
Or from Android Studio:
- Connect an Android device or start an emulator
- Click the Run button (green play icon)
- Select your device
- Click OK
# Create a keystore (one-time)
keytool -genkey -v -keystore mcp-hub-release.keystore \
-keyalg RSA -keysize 2048 -validity 10000 \
-alias mcp-hub-key
# Build signed APK
cd /home/ubuntu/mcp-hub/android
./gradlew assembleReleaseAPK will be in: android/app/build/outputs/apk/release/app-release.apk
mcp-hub/
├── android/ # ← Native Android project (ready for Android Studio)
│ ├── app/
│ │ ├── build.gradle # App build configuration
│ │ ├── proguard-rules.pro # Code obfuscation rules
│ │ └── src/
│ │ ├── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java/space/manus/mcp/hub/t20260329022456/
│ │ │ │ ├── MainActivity.kt
│ │ │ │ └── MainApplication.kt
│ │ │ └── res/ # Resources (strings, colors, icons, layouts)
│ │ └── debug/
│ ├── build.gradle # Root build configuration
│ ├── gradle.properties # Build properties (SDK versions, JVM args)
│ ├── gradlew # Gradle wrapper (Unix/Mac)
│ └── gradlew.bat # Gradle wrapper (Windows)
├── app/ # React Native TypeScript source
├── package.json
├── app.config.ts
└── ANDROID_*.md # Documentation files
- Update code in
app/directory - Rebuild Metro bundle:
pnpm run dev:metro
- Rebuild Android project:
cd android && ./gradlew assembleDebug
- Deploy to device/emulator
- Update Kotlin/Java code in
android/app/src/main/java/ - In Android Studio: Build → Rebuild Project (Ctrl+Shift+F9)
- Run the app
JavaScript/React Native:
pnpm add some-package
pnpm run dev:metro # Rebuild bundle
cd android && ./gradlew assembleDebugAndroid/Gradle:
- Edit
android/app/build.gradle - Add dependency to
dependenciesblock - In Android Studio: File → Sync Now
| File | Purpose | Edit When |
|---|---|---|
android/app/build.gradle |
App build config | Adding dependencies, changing SDK versions |
android/gradle.properties |
Build properties | Changing JVM memory, enabling features |
android/app/src/main/AndroidManifest.xml |
App metadata | Adding permissions, activities, services |
android/app/src/main/java/.../MainActivity.kt |
Main activity | Adding custom activity logic |
android/app/src/main/java/.../MainApplication.kt |
App initialization | Setting up global state, analytics |
android/app/proguard-rules.pro |
Code obfuscation | Adding classes to keep, suppressing warnings |
android/app/src/main/res/values/strings.xml |
String resources | Adding user-facing text |
android/app/src/main/res/values/colors.xml |
Color definitions | Customizing app colors |
Edit android/app/src/main/res/values/strings.xml:
<string name="app_name">My New App Name</string>Replace files in android/app/src/main/res/mipmap-*/:
mipmap-mdpi/ic_launcher.png(48×48)mipmap-hdpi/ic_launcher.png(72×72)mipmap-xhdpi/ic_launcher.png(96×96)mipmap-xxhdpi/ic_launcher.png(144×144)mipmap-xxxhdpi/ic_launcher.png(192×192)
Edit android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>Then request at runtime in your React Native code.
- Create a new Kotlin file in
android/app/src/main/java/space/manus/mcp/hub/t20260329022456/ - Implement the module
- Register in
MainApplication.kt - Call from React Native using
NativeModules
See React Native Native Modules for details.
In Android Studio:
- View → Tool Windows → Logcat
- Filter by package:
space.manus.mcp.hub - View real-time logs
- Set a breakpoint in Kotlin/Java code (click line number)
- Run → Debug (Shift+F9)
- Interact with app to hit breakpoint
- Step through code and inspect variables
- View → Tool Windows → Profiler
- Run → Profile (Ctrl+Alt+F10)
- Interact with app
- Analyze CPU, memory, and network usage
| Variant | Purpose | Command |
|---|---|---|
debug |
Development with debugging | ./gradlew assembleDebug |
debugOptimized |
Development with optimizations | ./gradlew assembleDebugOptimized |
release |
Production (signed) | ./gradlew assembleRelease |
Switch in Android Studio: Build → Select Build Variant
cd android
# Build debug APK
./gradlew assembleDebug
# Build release APK
./gradlew assembleRelease
# Build and install on device
./gradlew installDebug
# Run tests
./gradlew test
# View dependencies
./gradlew dependencies
# Clean build
./gradlew clean
# Rebuild project
./gradlew build# Clear cache and resync
cd android
rm -rf .gradle build
./gradlew clean# Rebuild dependencies
pnpm install
pnpm run dev:metro
cd android && ./gradlew clean build# Check ADB connection
adb devices
# Restart ADB
adb kill-server && adb start-server
# Enable USB debugging on deviceEdit android/gradle.properties:
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m- Open in Android Studio — Follow the "Quick Start" section above
- Build and test — Run the debug APK on a device or emulator
- Customize — Change app name, icon, colors, and theme
- Add features — Modify React/TypeScript code or create native modules
- Prepare for release — Generate signed APK for distribution
- ANDROID_STUDIO_SETUP.md — Detailed setup and build instructions
- ANDROID_DEVELOPMENT.md — Development workflow, debugging, testing
- ANDROID_PROJECT_STRUCTURE.md — Directory structure and file reference
- Android Studio Documentation
- React Native Android Guide
- Expo Prebuild Documentation
- Gradle Documentation
- Android Developers Guide
Ready to go native? Open ANDROID_STUDIO_SETUP.md for step-by-step instructions!