- Overview
- Features
- Screenshots
- Quick Start
- Installation
- Usage Guide
- Technical Architecture
- Generated Android Features
- Advanced Configuration
- Troubleshooting
- Development
- Contributing
- License
AABuilder is a powerful desktop application built with Electron and Node.js that automates the generation of production-ready Android WebView applications. Whether you have a responsive website, Progressive Web App (PWA), or local HTML project, AABuilder converts it into a native Android app with modern features and optimizations.
- Web Developers wanting to quickly port web apps to Android
- Businesses needing simple Android apps from existing websites
- Prototyping mobile app concepts rapidly
- Content Creators publishing interactive content as Android apps
- Educational Projects demonstrating web-to-mobile conversion
- Intuitive GUI: Clean, modern interface built with Electron
- Cross-Platform: Runs on Windows, macOS, and Linux
- Real-time Validation: Instant feedback on package names and configurations
- Drag & Drop Support: Easy file and folder selection
- Multiple Source Types:
- 🌐 Online URLs: Convert any website to Android app
- 📁 Local Projects: Bundle HTML/CSS/JS projects for offline use
- Modern Android Support: Targets Android API 21+ with latest best practices
- Material Design: Generated apps follow Material Design guidelines
- Java 21 Compatible: Uses Gradle 8.5 for modern development environment
- App Icons: Upload and automatically process PNG, JPG, or ICO files
- Color Themes: Set primary colors for consistent branding
- Permission Management: Granular control over Android permissions
- Package Naming: Robust validation for proper Android package names
- Smart Back Button Handling: Modern OnBackPressedDispatcher with graceful exit dialogs
- Progressive Enhancement: Automatic fallbacks for older Android versions
- Template System: Extensible template architecture for customization
- Error Recovery: Comprehensive error handling and user feedback
- Project Validation: Pre-flight checks ensure successful builds
Coming Soon - Add screenshots of the application interface
# Clone the repository
git clone https://github.com/yourusername/aabuilder.git
cd aabuilder
# Install dependencies
npm install
# Start the application
npm startThat's it! The AABuilder GUI will launch, and you can start creating Android apps immediately.
- Node.js v14 or higher (Download)
- npm (included with Node.js)
- Android Studio (for building the generated projects)
- Java 11+ (Java 17 or 21 recommended for optimal compatibility)
-
Clone the repository:
git clone https://github.com/yourusername/aabuilder.git cd aabuilder -
Install dependencies:
npm install
-
Run in development mode:
npm run dev # Includes DevTools for debugging
# Create distributable packages
npm run build # Creates installers for current platform
npm run pack # Creates unpacked app directorynpm start- App Name: Enter a user-friendly name (e.g., "My Awesome App")
- Package Name: Unique identifier following Android conventions (e.g.,
com.yourcompany.yourapp)- ✅ Must start with a letter
- ✅ Can contain letters, numbers, and underscores
- ✅ Must follow reverse domain notation
- App Icon (Optional): Upload PNG, JPG, or ICO files
- Primary Color: Choose your app's theme color
Option A: Online URL
- Select "Online URL" option
- Enter the complete website URL (e.g.,
https://example.com) - Perfect for converting existing websites to apps
Option B: Local Project
- Select "Local Folder" option
- Choose a folder containing your web project
- Required: Must include an
index.htmlfile - All HTML, CSS, JS, and asset files will be bundled
Select the Android permissions your app requires:
- 🌐 INTERNET (Auto-selected for online apps)
- 📶 ACCESS_NETWORK_STATE - Check connectivity
- 📷 CAMERA - Access device camera
- 📄 READ_EXTERNAL_STORAGE - Read files
- 💾 WRITE_EXTERNAL_STORAGE - Save files
- 📍 ACCESS_FINE_LOCATION - GPS location
- 🎤 RECORD_AUDIO - Audio recording
- 📳 VIBRATE - Device vibration
- Choose Output Location (Optional): Default is
./output - Click "Generate Android Project"
- Wait for Completion: The process typically takes 10-30 seconds
- Success!: Your Android Studio project is ready
- Open Android Studio
- Open Project: Select the generated project folder
- Sync Project: Let Gradle sync complete
- Build APK:
Build → Build Bundle(s) / APK(s) → Build APK(s) - Sign & Distribute: Follow Android Studio's signing workflow
AABuilder/
├── 📁 electron-app/ # Main Electron application
│ ├── 📄 main.js # Main process & IPC handlers
│ ├── 📄 preload.js # Secure IPC bridge
│ ├── 📁 assets/ # Application assets
│ │ └── 📁 icons/ # App icons (256x256, 512x512)
│ ├── 📁 renderer/ # UI layer
│ │ ├── 📄 index.html # Main interface
│ │ ├── 📄 styles.css # Modern styling
│ │ └── 📄 script.js # UI logic & validation
│ └── 📁 src/ # Core logic
│ └── 📄 project-generator.js # Android project generation
├── 📁 templates/ # Android project templates
│ └── 📁 android-base/ # Base WebView template
│ ├── 📁 app/src/main/ # Android source structure
│ │ ├── 📄 AndroidManifest.xml
│ │ ├── 📁 java/ # Java source files
│ │ └── 📁 res/ # Android resources
│ ├── 📄 gradle.properties # Gradle configuration
│ └── 📄 gradlew.bat # Gradle wrapper
├── 📁 output/ # Generated projects (gitignored)
├── 📁 test-assets/ # Sample web assets
├── 📄 package.json # Dependencies & scripts
└── 📄 README.md # This documentation
- Electron 38.0.0: Cross-platform desktop framework
- Node.js: JavaScript runtime
- fs-extra: Enhanced file system operations
- archiver: File compression utilities
- uuid: Unique identifier generation
- Android API 21-35: Supports Android 5.0 Lollipop to Android 15
- Gradle 8.13: Modern build system with Java 11+ compatibility
- Android Gradle Plugin 8.13.0: Latest build tools
- AppCompat: Backward compatibility for Material Design
- WebView: Chromium-based web rendering engine
// Modern approach for Android 13+ (API 33+)
getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(true) {
@Override
public void handleOnBackPressed() {
handleBackPress(); // Custom navigation logic
}
});
// Fallback for older Android versions
@Override
public void onBackPressed() {
handleBackPress(); // Ensures compatibility
}AABuilder automatically generates Android theme files based on your selected primary color:
<color name="colorPrimary">{{PRIMARY_COLOR}}</color>
<color name="colorPrimaryDark">{{PRIMARY_COLOR_DARK}}</color>
<color name="colorAccent">{{ACCENT_COLOR}}</color>The template system uses placeholder replacement for dynamic content:
{{APP_NAME}}→ Your app name{{PACKAGE_NAME}}→ Your package identifier{{PRIMARY_COLOR}}→ Your theme color{{PERMISSIONS}}→ Selected Android permissions
- Hardware Acceleration: Enabled for smooth animations
- WebView Caching: Optimized cache settings for faster loading
- DOM Storage: Local storage support for web apps
- JavaScript Optimization: V8 engine with latest optimizations
- Material Design: Follows Google's design guidelines
- Status Bar Integration: Proper theme-aware status bar
- Splash Screen: Professional app launch experience
- Exit Confirmation: User-friendly exit dialogs
- Debug Support: WebView debugging enabled in debug builds
- Error Handling: Comprehensive error pages and fallbacks
- Console Logging: JavaScript console accessible via ADB
- File Access: Supports local asset loading for offline apps
- Secure WebView: Configured with security best practices
- Permission Management: Only requests necessary permissions
- HTTPS Enforcement: Configurable SSL/TLS settings
- File Access Control: Sandboxed file system access
AABuilder uses robust package name validation:
const packageRegex = /^[a-zA-Z][a-zA-Z0-9_]*(\.(\w+))*$/;- ✅ Must start with a letter
- ✅ Supports dots, letters, numbers, underscores
- ✅ Follows Android package naming conventions
Developers can extend AABuilder by modifying templates:
- Edit Base Template: Modify files in
templates/android-base/ - Add Placeholders: Use
{{CUSTOM_PLACEHOLDER}}syntax - Update Generator: Add placeholder handling in
project-generator.js - Test Changes: Use
npm testto validate templates
Customize Electron builds in package.json:
"build": {
"appId": "com.varabit.aabuilder",
"productName": "AABuilder",
"win": { "icon": "electron-app/assets/icons/icon256x256.ico" },
"mac": { "icon": "electron-app/assets/icons/icon512x512.ico" },
"linux": { "icon": "electron-app/assets/icons/icon512x512.ico" }
}Symptoms: AABuilder doesn't launch or crashes immediately
Solutions:
- ✅ Verify Node.js installation:
node --version - ✅ Reinstall dependencies:
rm -rf node_modules && npm install - ✅ Check for port conflicts
- ✅ Run in development mode:
npm run dev
Symptoms: Error during Android project creation
Solutions:
- ✅ Validate package name format (e.g.,
com.company.app) - ✅ Ensure sufficient disk space (>100MB free)
- ✅ Check folder permissions for output directory
- ✅ Verify local folder contains
index.html - ✅ Close any files that might be locked
Symptoms: Generated project won't build in Android Studio
Solutions:
- ✅ Update Android Studio to latest version
- ✅ Install Android SDK API 21+ via SDK Manager
- ✅ Verify Gradle sync completes successfully
- ✅ Check Java version compatibility (Java 21 recommended)
- ✅ Clear Gradle cache:
./gradlew clean
Symptoms: "Invalid package name" despite correct format
Solutions:
- ✅ Ensure no spaces in package name
- ✅ Start with lowercase letter
- ✅ Use reverse domain notation:
com.yourcompany.appname - ✅ Avoid reserved keywords (e.g.,
android,java)
Run AABuilder with enhanced debugging:
npm run dev # Opens DevTools for detailed error logsCheck these locations for detailed logs:
- Electron Console: Press F12 in AABuilder
- Node.js Output: Terminal running
npm start - Android Studio: Build logs and Gradle output
We welcome contributions! Here's how to get started:
-
Fork & Clone:
git clone https://github.com/yourusername/aabuilder.git cd aabuilder npm install -
Development Workflow:
npm run dev # Start with DevTools npm test # Run validation tests npm run build # Test production build
UI Changes (electron-app/renderer/):
- Modern ES6+ JavaScript
- CSS Grid/Flexbox for layouts
- Accessibility-first design principles
Backend Logic (electron-app/src/):
- Node.js with async/await patterns
- Comprehensive error handling
- Detailed logging for debugging
Android Templates (templates/):
- Follow Android best practices
- Use placeholder syntax:
{{VARIABLE_NAME}} - Maintain compatibility with API 21+
# Test template generation
npm test
# Manual testing workflow
1. Generate test project
2. Open in Android Studio
3. Build and run on device/emulator
4. Verify all features work correctly-
Update UI (
renderer/index.html):<label> <input type="checkbox" name="permissions" value="NEW_PERMISSION"> New Permission Description </label>
-
Update Template (
templates/android-base/AndroidManifest.xml):<!-- Add conditional permission --> {{#if NEW_PERMISSION}} <uses-permission android:name="android.permission.NEW_PERMISSION" /> {{/if}}
-
Update Generator (
src/project-generator.js):// Add permission handling logic const hasNewPermission = projectConfig.permissions.includes('NEW_PERMISSION');
- 🐛 Bug Reports: Found an issue? Open an issue
- 💡 Feature Requests: Have an idea? Start a discussion
- 📝 Documentation: Improve this README or add tutorials
- 🔧 Code: Submit pull requests for bug fixes or new features
- 🧪 Testing: Help test on different platforms and Android versions
- Follow existing code style and conventions
- Add tests for new features
- Update documentation for any changes
- Test thoroughly on multiple platforms
- Keep commits atomic and well-described
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request with detailed description
This project is designed for educational and personal use. When distributing generated Android applications:
- ✅ Ensure compliance with web content licenses
- ✅ Follow Google Play Store policies
- ✅ Respect third-party library licenses
- ✅ Include proper attribution where required
- Electron: MIT License
- Android SDK: Apache License 2.0
- Material Design Icons: Apache License 2.0
Hridoy Varaby
Varabit Web Design & Development
- Google Android Team for excellent documentation
- Electron community for robust cross-platform framework
- All contributors and testers who helped improve AABuilder
⭐ Star this repo if AABuilder helped you create amazing Android apps! ⭐
🐛 Report Bug • 💡 Request Feature • 📖 Documentation
Made with ❤️ for the developer community