This guide explains how to compile your Historical Universe Models web app to Android APK and deploy it to Google Play Store.
Your HTML/JS web application has been configured with Capacitor to enable native Android compilation. The setup includes:
- ✅ Android platform configuration
- ✅ App icons for all required resolutions
- ✅ Proper Android manifest configuration
- ✅ Build scripts for development and production
- ✅ Google Play Store optimization
- Node.js 16+ and npm
- Android Studio (latest version)
- Java Development Kit (JDK) 11 or higher
- Android SDK with API level 33+
-
Install Android Studio:
- Download from developer.android.com
- Install Android SDK and build tools
- Set up Android Virtual Device (AVD) for testing
-
Configure Environment Variables:
export ANDROID_HOME=$HOME/Android/Sdk export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
-
Install Dependencies:
npm install
# Copy web assets to dist folder
npm run build# Copy assets and sync plugins
npm run android:build# Open the android project in Android Studio
npm run android:open# Build and run on connected device/emulator
npm run android:runFor Google Play Store deployment, you need to sign your APK with a private key:
cd android/app
keytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000Important: Keep your keystore file and passwords secure. You'll need them for all future updates.
Create android/keystore.properties:
storePassword=yourStorePassword
keyPassword=yourKeyPassword
keyAlias=my-key-alias
storeFile=my-release-key.keystoreUpdate android/app/build.gradle signing configuration:
signingConfigs {
release {
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}cd android
./gradlew assembleReleaseThe signed APK will be generated at:
android/app/build/outputs/apk/release/app-release.apk
For Google Play Store, use Android App Bundle format:
cd android
./gradlew bundleReleaseThe AAB file will be at:
android/app/build/outputs/bundle/release/app-release.aab
The following assets have been generated in play-store-assets/:
- App Icon:
play-store-icon.png(512×512) - Feature Graphic:
feature-graphic.png(1024×500)
You'll also need to create:
- Screenshots (phone, tablet, wear, TV as applicable)
- Privacy Policy URL
- App description and metadata
-
Create Developer Account:
- Go to Google Play Console
- Pay the $25 one-time registration fee
- Complete account verification
-
Create New App:
- Click "Create app"
- Choose app name: "Historical Universe Models"
- Select "App" as default language
- Choose "Free" or "Paid" (recommend Free)
- Confirm declarations
Fill out the required information:
- App name: Historical Universe Models
- Short description: Interactive 3D exploration of historical astronomical models
- Full description:
Explore the evolution of humanity's understanding of the cosmos through interactive 3D visualizations of historical astronomical models.
Features:
• Five major historical models: Aristotle, Ptolemaic, Copernican, Galilean, and Kepler
• Real-time 3D animations of planetary motions
• Educational information about each model
• Interactive controls for lighting and viewing
• Realistic planet textures and atmospheric effects
• Mobile-optimized touch controls
Perfect for students, educators, and astronomy enthusiasts who want to understand how our view of the universe evolved from ancient times to the early modern period.
- App category: Education
- Content rating: Everyone
- Target audience: 13+ (educational content)
Upload the generated assets:
- App icon (512×512):
play-store-assets/play-store-icon.png - Feature graphic (1024×500):
play-store-assets/feature-graphic.png - Screenshots: Capture from running app on different devices
Complete the content rating questionnaire:
- Select "Education" category
- Answer questions about educational content
- Content should receive "Everyone" rating
- Enable "Google Play App Signing" (recommended)
- Upload your app bundle (.aab file)
- Google will manage your app signing key
-
Internal Testing (optional but recommended):
- Upload your AAB file
- Add internal testers
- Test the app thoroughly
-
Production Release:
- Upload the final AAB file
- Complete all required information
- Submit for review
For future updates:
- Update
versionCodeandversionNameinandroid/app/build.gradle - Make your changes to the web app
- Run the build process
- Upload new AAB to Play Console
- Submit for review
-
Build Errors:
# Clean and rebuild cd android ./gradlew clean ./gradlew assembleRelease
-
WebGL Issues:
- Ensure
android:hardwareAccelerated="true"in manifest - Test on real devices, not just emulators
- Ensure
-
Performance Issues:
- Enable ProGuard/R8 optimization in release builds
- Test on lower-end devices
-
File Access Issues:
- Ensure all assets are in the correct directories
- Check CORS configuration if needed
- App launches correctly
- 3D graphics render properly
- Touch controls work smoothly
- All model switching functions work
- Lighting controls are responsive
- App handles rotation correctly
- Performance is acceptable on target devices
- Never commit keystore files to version control
- Store keystore and passwords securely
- Use different keystores for debug and release
- Enable ProGuard for release builds
- Review all permissions in AndroidManifest.xml
For technical issues:
- Check Capacitor documentation: capacitorjs.com
- Android developer documentation: developer.android.com
- Play Console help: support.google.com/googleplay
├── android/ # Native Android project
│ ├── app/
│ │ ├── src/main/
│ │ │ ├── AndroidManifest.xml # App manifest
│ │ │ └── res/mipmap-*/ # App icons
│ │ └── build.gradle # Build configuration
│ └── keystore.properties # Signing configuration (create this)
├── capacitor.config.ts # Capacitor configuration
├── dist/ # Built web assets
├── play-store-assets/ # Generated store assets
├── app-icon.svg # Source icon
├── generate-icons.sh # Icon generation script
└── package.json # Build scripts
Your Historical Universe Models app is now ready for Android deployment! 🚀🌌