Role: You are an expert Android developer (Kotlin ...

创建于:2026年5月30日

使用 GPT-5.5 Thinking 回答 Chat01

问题

Role: You are an expert Android developer (Kotlin + Jetpack Compose).
Task: Generate a complete, working Android project that builds into a signed .apk file (no demo, no API keys, no login required).

App Name
Bhavesh Personal Workout

User Profile (Hardcoded as Bhavesh)
Name: Bhavesh

Age: 35 years

Height: 5.4 ft (162.5 cm)

Weight: 73 kg

Experience: Strength training for 2.5 years

Current goal: Athletic body shaping (like a functional athlete – not bodybuilder)

Core Workout Plan (Athlete-style)
The app must include a weekly workout schedule based on:

Power cleans

Squats (back, front, overhead)

CrossFit-style WODs (e.g., Cindy, Fran, Helen scaled)

Hybrid movements (thrusters, burpee pull-ups, kettlebell swings, box jumps)

Olympic lifting basics

Mobility & core finishers

The plan must be adaptive – Bhavesh can mark sets/reps as done, and the app suggests progressive overload (add 2.5 kg or +1 rep next session).

Required Features (ALL must work offline, no backend)
Dashboard – Daily progress card (steps, calories, workout done, meals logged)

Workout Tracker

Predefined athlete workouts for 6 days/week (1 rest day)

Exercise library with video thumbnails (local placeholders)

Set/rep logger with weight entry

Rest timer between sets

Meal Planner

Suggested meals for: high protein, athletic performance

Macro calculator based on 73 kg, athlete goal (P: 160g, C: 250g, F: 60g)

Manual food log with macro tracking

Photo Capture & Body Progress

Take/select photo using camera/gallery (no external API)

Store locally (date stamped)

Before/after gallery inside app

Activity Tracker

Step counter using Android’s SensorManager or Activity Recognition (no Google Fit API – works offline)

Manual step entry fallback

Macro & Water Tracker

Daily log with pie chart

Water intake (cups/ml)

Progress Analytics

Weight trend (manual entry)

Workout volume (kg lifted per week)

Photos timeline

Technical Requirements (Crucial)
No API keys – everything local (Room database or DataStore)

No login – single user (Bhavesh)

Minimum SDK: 26 (Android 8.0)

Target SDK: 34

UI: Jetpack Compose (material3)

Permissions: CAMERA, WRITE_EXTERNAL_STORAGE (or scoped storage), ACTIVITY_RECOGNITION, POST_NOTIFICATIONS (for reminders)

Reminders: Local notifications for workouts & meals

Output: Provide the entire Android Studio project as a ZIP + instructions to generate the .apk (or directly generate a debug .apk if environment allows)

Working .APK Requirement
The generated code must compile successfully without errors.

No placeholder “coming soon” screens – every feature listed must be functional.

App must not crash on launch or during core flows.

Use mock local images for exercise thumbnails (drawables).

Extra Polish (Optional but expected)
Dark/light theme toggle

Weekly summary screen

Sound/vibration at end of rest timer

Export progress as CSV (stored locally)

Final output:

Complete Android project code (structured folders).

build.gradle files (app & project).

AndroidManifest.xml with all permissions.

Step-by-step CLI or Android Studio instructions to generate the .apk.

If possible, include a pre-built .apk (debug) in the response.

思考

Assessing potential issues and simplifications

I’m considering if val composeBom = platform(...) in the dependencies block is okay — in Kotlin DSL, it's fine for local values. android.defaults.buildfeatures.buildconfig=true might be deprecated, but it's still fine. I also noted that the debug signing config may not exist, but Android handles it. I had some questions around MaterialTheme.typography in Theme.kt, but it looks fine. I’m also thinking about trying Gradle with downloaded files, but it doesn’t seem viable.

Thought for 6m 22s

回答

Done: Download the complete Android Studio project ZIP

I attempted to build a debug APK in this environment, but Gradle/Android SDK are not installed here:

text
gradle: command not found

So I could not include a pre-built APK. The project includes all requested source files and build configuration.

Build it locally:

bash
cd BhaveshPersonalWorkout gradle :app:assembleDebug

Debug APK output:

text
app/build/outputs/apk/debug/app-debug.apk

The debug APK is automatically signed by Android’s debug keystore.

For Android Studio:

  1. Open the unzipped BhaveshPersonalWorkout folder.
  2. Let Gradle sync.
  3. Install SDK Platform 34 if prompted.
  4. Choose Build > Build Bundle(s) / APK(s) > Build APK(s).
  5. Find the APK at app/build/outputs/apk/debug/app-debug.apk.

Included features: offline DataStore persistence, Compose Material3 UI, workout tracker, set/reps/weight logging, rest timer with sound/vibration, progressive overload suggestions, meal/macro/water tracker, local camera/gallery progress photos, step counter/manual fallback, analytics charts, reminders, dark theme, weekly summary, and CSV export.

分享这个问答