flutter-geolocator
                                
                                 flutter-geolocator copied to clipboard
                                
                                    flutter-geolocator copied to clipboard
                            
                            
                            
                        Fatal exception, emulator Android 12
Having this issue on emulator, Android 12
With google services installed & updated
[  +80 ms] E/AndroidRuntime(31825): FATAL EXCEPTION: main
[        ] E/AndroidRuntime(31825): Process: com.google.android.gms.persistent, PID: 31825
[        ] E/AndroidRuntime(31825): java.lang.RuntimeException: Unable to create service com.google.android.location.internal.GoogleLocationManagerService: java.lang.IllegalArgumentException: com.google.android.gms: Targeting S+ (version 10000 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
[        ] E/AndroidRuntime(31825): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
[        ] E/AndroidRuntime(31825): 	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4387)
[        ] E/AndroidRuntime(31825): 	at android.app.ActivityThread.access$1600(ActivityThread.java:250)
[        ] E/AndroidRuntime(31825): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2004)
[        ] E/AndroidRuntime(31825): 	at android.os.Handler.dispatchMessage(Handler.java:106)
[        ] E/AndroidRuntime(31825): 	at android.os.Looper.loopOnce(Looper.java:201)
[        ] E/AndroidRuntime(31825): 	at android.os.Looper.loop(Looper.java:288)
[        ] E/AndroidRuntime(31825): 	at android.app.ActivityThread.main(ActivityThread.java:7858)
[        ] E/AndroidRuntime(31825): 	at java.lang.reflect.Method.invoke(Native Method)
[        ] E/AndroidRuntime(31825): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
[        ] E/AndroidRuntime(31825): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:984)
[        ] E/AndroidRuntime(31825): Caused by: java.lang.IllegalArgumentException: com.google.android.gms: Targeting S+ (version 10000 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
[        ] E/AndroidRuntime(31825): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.
[        ] E/AndroidRuntime(31825): 	at android.app.PendingIntent.checkFlags(PendingIntent.java:375)
[        ] E/AndroidRuntime(31825): 	at android.app.PendingIntent.buildServicePendingIntent(PendingIntent.java:728)
[        ] E/AndroidRuntime(31825): 	at android.app.PendingIntent.getService(PendingIntent.java:689)
[        ] E/AndroidRuntime(31825): 	at vmv.s(:com.google.android.gms@[email protected] (150400-441847897):2)
[        ] E/AndroidRuntime(31825): 	at vmv.<init>(:com.google.android.gms@[email protected] (150400-441847897):2)
[        ] E/AndroidRuntime(31825): 	at vmv.c(:com.google.android.gms@[email protected] (150400-441847897):0)
[        ] E/AndroidRuntime(31825): 	at bwsb.<init>(:com.google.android.gms@[email protected] (150400-441847897):310)
[        ] E/AndroidRuntime(31825): 	at com.google.android.location.internal.GoogleLocationManagerChimeraService.onCreate(:com.google.android.gms@[email protected] (150400-441847897):9)
[        ] E/AndroidRuntime(31825): 	at ery.onCreate(:com.google.android.gms@[email protected] (150400-441847897):1)
[        ] E/AndroidRuntime(31825): 	at tta.onCreate(:com.google.android.gms@[email protected] (150400-441847897):4)
[        ] E/AndroidRuntime(31825): 	at android.app.ActivityThread.handleCreateService(ActivityThread.java:4374)
[        ] E/AndroidRuntime(31825): 	... 9 more
you can solve the problem with put the file below into the directory
flutter/.pub-cache/hosted/pub.dartlang.org/background_location-0.7.0/android/src/main/kotlin/com/almoullim/background_location/(here)
you can thank to Misbachul Munir
I'll close this issue for now. feel free to reopen when needed.