MissingForegroundServiceTypeException
What it means. If your app targets Android 14 (API level 34) and starts a foreground service whose type is not declared in the manifest, the system throws MissingForegroundServiceTypeException when the service calls startForeground(). The app crashes at that moment, not at build time.
How to fix it. Declare the type on the service and add the matching permission:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<service
android:name=".MyMediaPlaybackService"
android:foregroundServiceType="mediaPlayback"
android:exported="false" />
In React Native apps the service usually belongs to a library. Current releases of react-native-track-player and react-native-background-geolocation declare their type themselves, so updating fixes it. With Notifee foreground services, add app.notifee.core.ForegroundService to your own manifest with the type you use, as Notifee's documentation shows.
Check your app. npx nativekeel checks your target SDK and the native setup that changes with it.
npx nativekeel