For questions regarding programming in Android 12 (a.k.a., Android S), the primary 2021 version update for the Android OS.
Questions tagged [android-12]
563 questions
233
votes
38 answers
android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify
After upgrading to android 12, the application is not compiling. It shows
"Manifest merger failed with multiple errors, see logs"
Error showing in Merged manifest:
Merging Errors:
Error: android:exported needs to be explicitly specified for .…

Ashique Bava
- 2,486
- 2
- 9
- 21
129
votes
9 answers
Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
While debugging the application in android 12, the app is getting crashed.

Rahul Kavati
- 3,800
- 3
- 7
- 15
104
votes
19 answers
You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without the 'an
Issue: You uploaded an APK or Android App Bundle which has an activity, activity alias, service, or broadcast receiver with intent filter, but without the 'android: exported' property set. This file can't be installed on Android 12 or higher. See…

Syed Waleed
- 967
- 2
- 5
- 7
83
votes
12 answers
Android 12 New Bluetooth Permissions
Bluetooth is the main dependency of our app. So, We already try to implement new Android 12 Bluetooth permissions. Our only resource is Android developers New Bluetooth permissions in Android 12. There is just saying add…

Mustafa Kuloğlu
- 1,122
- 1
- 8
- 16
80
votes
9 answers
Why am I seeing EGL_emulation app_time_stats in the log when running on an Android 12 emulator?
When testing a Flutter app on an emulator running Android 12, I'm seeing lines like these in the logs at regular intervals (approximately every second):
D/EGL_emulation(32175): app_time_stats: avg=312.93ms min=133.69ms max=608.57ms count=4
What do…

Magnus
- 17,157
- 19
- 104
- 189
78
votes
8 answers
Manifest merger failed targeting Android 12
Using Android Studio 4.2.1, after changing sdk target to Android 12 in my build.gradle file, I am getting a Manifest merger failed with multiple errors, see logs error.
The errors shown in the Merged Manifest tab are as follows:
Merging Errors:…

SVP
- 2,773
- 3
- 11
- 14
71
votes
8 answers
Fatal Android 12: Exception: startForegroundService() not allowed due to mAllowStartForeground false
I noticed one exception (Firebase Crashlytics) for Pixel 5 and Pixel 4a (both on Android 12), no other devices, happened only two times, one time for each device.
What does it mean? Android 11 and 12 have the same rules for working with foreground…

user924
- 8,146
- 7
- 57
- 139
67
votes
11 answers
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified
App crashes at runtime with the following error :
java.lang.IllegalArgumentException: maa.abc: Targeting
S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or
FLAG_MUTABLE be specified when creating a PendingIntent.
Strongly consider…

Mouaad Abdelghafour AITALI
- 4,007
- 7
- 27
- 54
61
votes
11 answers
Android 12 Splash Screen Icon Not Displaying
I am seeing a weird issue with a new app that I am starting. I am utilizing the new Android 12 splash screen API to create my splash screen and I followed the guide provided by Google to do so. I included core-splashscreen in my project to provide…

Joseph Hawkes-Cates
- 1,911
- 2
- 12
- 13
57
votes
8 answers
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent, On AlarmPingSender
Problem
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. I got it after updating target SDK to 31. the error always come after AlarmPingSender. But i dont know any…

Joseph Sanjaya
- 741
- 1
- 7
- 9
48
votes
5 answers
How to configure Toast icon in Android 12?
Starting with Android 12, Google show a toast message with an app icon.
My application have launcher icon. Android 12 splash screen show app icon correctly.
Show toast by code
Toast.makeText(this, "Show simple toast",…

Denis
- 2,622
- 3
- 22
- 24
48
votes
4 answers
Google Chrome browser in Android 12 emulator doesn't load any webpages (internet is working!)
I'm using Android Studio 2020.3.1 Patch 2, on Windows 10 and I'm running an Android 12 emulator.
I'm attempting to simply load any webpage using Google Chrome, however all that happens is that the progress bar appears, but nothing ever loads…

Zarek
- 939
- 3
- 13
- 21
45
votes
23 answers
android:exported added but still getting error Apps targeting Android 12 and higher are required to specify an explicit value for android:exported
I have added android:exported="true" to my only activity in manifest but still getting below error after updating compile sdk and target sdk version to 31.I also tried rebuilding the project , invalidating cache and restart but that didn't…

Android Developer
- 9,157
- 18
- 82
- 139
39
votes
2 answers
How does setExpedited work and is it as good&reliable as a foreground service?
Background
In the past, I used a foreground IntentService to handle various events that come one after another. Then it was deprecated when Android 11 came (Android R, API 30) and it was said to prefer to use Worker that uses setForegroundAsync…

android developer
- 114,585
- 152
- 739
- 1,270
27
votes
4 answers
CannotDeliverBroadcastException only on Pixel devices running Android 12
I'm seeing a crash come through Crashlytics that I'm unable to reproduce or locate the cause of. The crash only ever happens on Google Pixel devices running Android 12, and the crash always happens in the background.
This is the crash log from…

Tommy Jackson
- 609
- 7
- 20