-
Install Android Studio
- Download from: https://developer.android.com/studio
- Install Android SDK 21+ (Android 5.0+)
- Install Android SDK 34 (Android 14) for target
-
Install Java Development Kit
- Java 8 or newer required
- Verify:
java -version
-
Install Git
- Download from: https://git-scm.com/
- Verify:
git --version
-
Clone the Repository
git clone https://github.com/sh20raj/float-browser.git cd float-browser -
Open in Android Studio
- Launch Android Studio
- Click "Open an Existing Project"
- Navigate to the
float-browserfolder - Click "OK"
-
Sync Project
- Android Studio will automatically sync Gradle
- Wait for "Gradle sync finished" message
- Resolve any dependency issues if prompted
-
Build Release APK
- Go to
Build→Generate Signed Bundle / APK - Select "APK" and click "Next"
- Create a new keystore or use existing one
- Fill in keystore details:
Keystore path: /path/to/your/keystore.jks Password: [your-password] Key alias: float-browser Key password: [your-key-password] - Click "Next" → Select "release" → "Finish"
- Go to
-
Locate APK
app/build/outputs/apk/release/app-release.apk
-
Clone and Navigate
git clone https://github.com/sh20raj/float-browser.git cd float-browser -
Create Keystore (First time only)
keytool -genkey -v -keystore float-browser.jks -keyalg RSA -keysize 2048 -validity 10000 -alias float-browser
-
Create signing.properties
# Create app/signing.properties storeFile=../float-browser.jks storePassword=your_store_password keyAlias=float-browser keyPassword=your_key_password -
Build Release APK
# Make gradlew executable (Linux/Mac) chmod +x gradlew # Build release APK ./gradlew assembleRelease # Windows gradlew.bat assembleRelease
-
APK Location
app/build/outputs/apk/release/app-release.apk
-
Enable R8 (Already configured)
buildTypes { release { minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') } }
-
Check APK Size
# Check final APK size ls -lh app/build/outputs/apk/release/app-release.apk # Analyze APK contents ./gradlew analyzeReleaseBundle
-
APK Analyzer (Android Studio)
- Go to
Build→Analyze APK - Select your APK file
- Review size breakdown
- Go to
-
Enable Developer Options
- Go to Settings → About Phone
- Tap "Build Number" 7 times
- Go back to Settings → Developer Options
- Enable "USB Debugging"
-
Install via ADB
# Install APK adb install app/build/outputs/apk/release/app-release.apk # Uninstall if needed adb uninstall com.shaswatraj.floatbrowser
-
Install via File Manager
- Copy APK to device
- Open with file manager
- Tap to install
- Allow "Install from Unknown Sources" if prompted
-
APK Size Check
# Should be under 1MB du -h app-release.apk -
Memory Usage
# Check memory usage while running adb shell dumpsys meminfo com.shaswatraj.floatbrowser -
Launch Time
# Measure cold start time adb shell am start -W com.shaswatraj.floatbrowser/.MainActivity
-
Gradle Sync Failed
# Clean and rebuild ./gradlew clean ./gradlew build -
SDK Not Found
- Open Android Studio
- Go to File → Project Structure
- Set correct SDK path
-
Keystore Issues
# Verify keystore keytool -list -v -keystore float-browser.jks -
APK Too Large
- Check ProGuard rules in
proguard-rules.pro - Remove unused resources
- Use vector drawables only
- Check ProGuard rules in
-
Debug Build (for testing)
./gradlew assembleDebug
-
Release Build (for distribution)
./gradlew assembleRelease
-
Bundle for Play Store
./gradlew bundleRelease
Create .github/workflows/build.yml:
name: Build APK
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build APK
run: ./gradlew assembleRelease
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release
path: app/build/outputs/apk/release/app-release.apk- APK builds successfully
- APK size is under 1MB
- App installs and launches
- All features work correctly
- No crashes or major bugs
- Performance meets targets
- Signed with release keystore
- Ready for distribution
Next Step: See PUBLISH_GUIDE.md for publishing instructions!