Debug (Android)
When debugging the app on a connected Android device:
- •
Build and deploy to the connected device:
bashJAVA_HOME=/Library/Java/JavaVirtualMachines/temurin-24.jdk/Contents/Home npm run android:deploy
- •
Watch logcat for app logs (filtered to the app's webview):
bashadb logcat -s chromium:* CapacitorHttp:* AdMob:* CapacitorConsole:* | grep -E '\[AD-DEBUG\]|ERROR|WARN|console'
- •
Common log filters:
- •AdMob:
adb logcat -s Ads:* AdMob:* - •Capacitor:
adb logcat -s Capacitor:* CapacitorConsole:* - •JS console:
adb logcat chromium:D | grep -i console - •All app logs:
adb logcat -s chromium:* Capacitor:* Ads:* AdMob:*
- •AdMob:
- •
Quick device check:
adb devicesto verify device is connected - •
Clear logcat before testing:
adb logcat -c - •
When reporting findings, include relevant log lines and timestamps.
- •
If the build fails, check:
- •JAVA_HOME is set correctly
- •Device is connected (
adb devices) - •USB debugging is enabled on the device