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
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
- Editor freezes after some time when using NavMeshQuery::Raycast
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