android / android/games-samples
TrivialKart-unity: Facing a bug after try to update into editor 2021 since play console asked to target Android 14 (API level 34)
- Dominant language
- C++
- Stars
- 307
- Forks
- 138
- Avg merge
- 8d 11h
- Merged PRs (30d)
- 2
Description
I was trying to set up this project: [games-samples/trivialkart/trivialkart-unity at main · android/games-samples](https://github.com/android/games-samples/tree/main/trivialkart/trivialkart-unity). It works well with Unity 2020, but since I want to learn how to deploy it on the Play Store, I needed to update it to at least Android API 34.
I tried changing the Android SDK and JDK paths but couldn’t find a clear solution. So, I upgraded my Unity Editor to 2021, which automatically provided JDK 11. However, this led to an error.
To fix it, I attempted to modify OnInitializeFailed(InitializationFailureReason error) to:
public void OnInitializeFailed(InitializationFailureReason error, string message)
But this resulted in a new error:
Assets\Scripts\Controller\PurchaseController.cs(83,50): error CS0535: ‘PurchaseController’ does not implement interface member ‘IStoreListener.OnInitializeFailed(InitializationFailureReason)’ [which mean they asked me to revert the method into the original one[
When I reverted the method back to:
public void OnInitializeFailed(InitializationFailureReason error)
The same original error reappeared:
Assets\Scripts\Controller\PurchaseController.cs(83,50): error CS0535: ‘PurchaseController’ does not implement interface member ‘IStoreListener.OnInitializeFailed(InitializationFailureReason, string)’
How can I resolve this issue?
Contributor guide
Research direction
Start with Assets/Scripts/Controller/PurchaseController.cs, especially OnInitializeFailed and the IStoreListener interface error, then compare the interface signature used by the Unity 2021 project with the implementation. Reproduce the compile error after the editor and Android SDK/JDK update. Done means the project compiles without CS0535 and can proceed toward the stated Android API 34 deployment goal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp, unity
- Domain
- game-dev, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100