I was trying to set up this project: games-samples/trivialkart/trivialkart-unity at main · android/games-samples. 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)’
When I reverted the method back to:
public void OnInitializeFailed(InitializationFailureReason error)
The 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?