Home › Build error fixes › Android / Gradle

Foreground service permission not declared in Play Console

Android / Gradle · last reviewed 2026-11-10

The error looks like this

Your app uses the following undeclared foreground service permissions: FOREGROUND_SERVICE_LOCATION

Why it happens

A library (location, health, media, calls, SDKs like Zoom) adds FOREGROUND_SERVICE_* permissions to your manifest.

How to fix it

  1. Find who adds it: android/app/build/intermediates/merged_manifests or Android Studio > Merged Manifest.
  2. If you need it: Play Console > App content > Foreground service permissions — describe the use and attach a video.
  3. If not: remove it in AndroidManifest.xml with <uses-permission android:name="android.permission.FOREGROUND_SERVICE_X" tools:node="remove"/>.

Not sure this is your error? Let ReleaseMedic read the whole log

Build logs are long and the last line is rarely the real cause. ReleaseMedic finds the first real error, explains it and gives the steps — free, and the log never leaves your computer.

$ npx releasemedic log build.log

Or pipe a build straight in: cd android && ./gradlew bundleRelease 2>&1 | npx releasemedic log -

Catch it before you build

Most release errors come from project settings you can check in seconds — signing, SDK levels, privacy manifests, permissions, push and login setup.

$ npx releasemedic

Related Android / Gradle errors