Initial commit: Add MathHomeworkHelper project with web and Android components
Some checks reported errors
continuous-integration/drone Build encountered an error
Some checks reported errors
continuous-integration/drone Build encountered an error
This commit is contained in:
commit
f9558008e1
37 changed files with 5318 additions and 0 deletions
114
MathHomeworkHelper/QUICKSTART.md
Normal file
114
MathHomeworkHelper/QUICKSTART.md
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
# 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
|
||||
1. Launch Android Studio
|
||||
2. Select "Open an existing Android Studio project"
|
||||
3. Navigate to and select the `MathHomeworkHelper` folder
|
||||
4. 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**
|
||||
1. In Android Studio, go to Tools → Device Manager
|
||||
2. Click "Create Device"
|
||||
3. Select a device (e.g., Pixel 4)
|
||||
4. Select an API level (API 30 or higher recommended)
|
||||
5. Click "Finish"
|
||||
6. Click the play button to start the emulator
|
||||
|
||||
**Option B: Using Physical Device**
|
||||
1. 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"
|
||||
2. Connect your device via USB cable
|
||||
3. Android Studio will detect it automatically
|
||||
|
||||
### Step 3: Build and Run
|
||||
1. Click the green "Run" button (or press Shift+F10)
|
||||
2. Select your emulator or device
|
||||
3. Click "OK"
|
||||
4. 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)
|
||||
```bash
|
||||
./gradlew assembleDebug
|
||||
# Output: app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
### Release APK (for distribution)
|
||||
```bash
|
||||
./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! 🚀
|
||||
Loading…
Add table
Add a link
Reference in a new issue