Some checks reported errors
continuous-integration/drone Build encountered an error
3.7 KiB
3.7 KiB
Quick Start Guide
Getting Started with Math Homework Helper Android App
Prerequisites
- Android Studio installed (download from https://developer.android.com/studio)
- Android SDK 21+ installed
- Java 11+ installed
Step 1: Open the Project
- Launch Android Studio
- Select "Open an existing Android Studio project"
- Navigate to and select the
MathHomeworkHelperfolder - Wait for Gradle to sync (this may take a few minutes on first load)
Step 2: Set Up an Emulator (or use a physical device)
Option A: Using Android Emulator
- In Android Studio, go to Tools → Device Manager
- Click "Create Device"
- Select a device (e.g., Pixel 4)
- Select an API level (API 30 or higher recommended)
- Click "Finish"
- Click the play button to start the emulator
Option B: Using Physical Device
- Enable Developer Mode on your Android device:
- Go to Settings → About Phone
- Tap "Build Number" 7 times
- Go back to Settings → Developer Options
- Enable "USB Debugging"
- Connect your device via USB cable
- Android Studio will detect it automatically
Step 3: Build and Run
- Click the green "Run" button (or press Shift+F10)
- Select your emulator or device
- Click "OK"
- Wait for the app to build and install (first build takes longer)
Step 4: Test the App
Once the app launches:
- You should see the Math Homework Helper interface
- Try selecting a difficulty level
- Solve a multiplication problem
- Click "Check Answer" to verify
- Use the language selector to change languages
Troubleshooting
Gradle Sync Issues
- Click "File" → "Sync Now"
- If that doesn't work, try "File" → "Invalidate Caches" → "Invalidate and Restart"
Emulator Won't Start
- Make sure you have enough disk space (at least 5GB)
- Try creating a new AVD with a different API level
- Check that virtualization is enabled in BIOS (for Windows/Linux)
App Crashes on Launch
- Check the Logcat (View → Tool Windows → Logcat)
- Look for red error messages
- Common issues:
- Missing assets (check app/src/main/assets/)
- JavaScript errors (check browser console in WebView)
WebView Not Displaying Content
- Ensure all HTML files are in
app/src/main/assets/ - Check that the file path in MainActivity matches:
file:///android_asset/index.html - Verify JavaScript is enabled in WebView settings
Project Structure Overview
MathHomeworkHelper/
├── app/ # Main app module
│ ├── src/main/
│ │ ├── java/ # Java source code
│ │ ├── res/ # Android resources (layouts, strings, styles)
│ │ ├── assets/ # Web app files (HTML, CSS, JS)
│ │ └── AndroidManifest.xml # App configuration
│ └── build.gradle # App build configuration
├── build.gradle # Project build configuration
└── settings.gradle # Gradle settings
Building for Distribution
Debug APK (for testing)
./gradlew assembleDebug
# Output: app/build/outputs/apk/debug/app-debug.apk
Release APK (for distribution)
./gradlew assembleRelease
# Output: app/build/outputs/apk/release/app-release.apk
Next Steps
- Customize the app icon (replace files in
app/src/main/res/mipmap/) - Modify the app name in
app/src/main/res/values/strings.xml - Update the theme colors in
app/src/main/res/values/styles.xml - Add more features by modifying
MainActivity.java
Need Help?
- Android Documentation: https://developer.android.com/docs
- WebView Guide: https://developer.android.com/guide/webapps/webview
- Gradle Documentation: https://gradle.org/
Happy coding! 🚀