Capacitor Android APK 404 Error - Assets Not Loading from Bundle

Job ID: 39995816

Budget: $250 – $750 USD

Here is a summary from Replit:
I'm deploying a React + Vite + Capacitor app to Android and hitting a blocker. PROBLEM:
APK builds and installs successfully
On launch, shows 404 error - cannot reach landing page
Capacitor.isNativePlatform() returns false (thinks it's web)
App appears to be looking for remote assets instead of bundled files CONTEXT:
Previously built with Expo EAS Build → landing page loaded successfully
Switched to GitHub Actions + direct Gradle builds → now getting 404s
Device: Pixel 9 Pro XL (Android)
Capacitor version: 7.x
Frontend: React + Vite + TypeScript WHAT I'VE TRIED (all failed):
Removed server block from capacitor.config.ts
Changed Vite build to use --base=./ for relative paths
Cleared WebView cache in MainActivity.java
Disabled service worker on native platforms
Verified npx cap sync android completes successfully FILES:
capacitor.config.ts: webDir='dist/public', no server config
Build command: npx vite build --base=./ && npx cap sync android
Logs show: "isNative: false, platform: web" QUESTION: What's causing the APK to fail loading bundled assets? Is there a Vite + Capacitor configuration issue I'm missing?