Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.2.0
Issue ID
MNB-58
Regression
No
UnityNotificationManager.java:164: error: cannot find symbol error when targeting SDK API lower than 33 with Mobile Notifications
Steps to reproduce:
1. Open the attached user's project
2. Make sure the SDK path in External Settings points toward Android Modules installed via HUB
3. Set the "Target SDK level" to 32, 31 or 30
4. Build for Android
5. Observe console error
Expected behavior: Build success
Actual behavior: build fails
Reproducible on: Mobile Notifications 2.2.0 (2021.3.28f1, 2022.3.4f1, 2023.1.4f1, 2023.2.0a23)
Not reproducible on: Mobile Notifications 2.1.1 (2021.3.26f1, 2022.2.21f1, 2023.1.0b18, 2023.2.0a16)
Notes:
-Console error:
UnityNotificationManager.java:164: error: cannot find symbol
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)
symbol: variable TIRAMISU
location: class VERSION_CODES
-Workaround is to set the Target SDK level to 33
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [OpenGLES][XR] Zooming in on the camera's URP opaque texture causes "double vision" on Quest in OpenGLES3
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
Resolution Note:
Mobile Notifications require SDK 33 to compile the code.
By default Unity set compile SDK to the same as target SDK. This can be altered by using custom gradle template:
- Enable Custom Main Gradle Template in Player Settings (Publishing)
- Open the template file in text Editor and modify compileSdkVersion to 33 instead of default **TARGETSDKVERSION**
Also note, that from August 31 Google Play will require to target SDK 33 for all new apps and app updates, so if you plan to publish anything after that date, set target SDK to 33:
https://developer.android.com/google/play/requirements/target-sdk