Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TrivialKart-unity: Facing a bug after try to update into editor 2021 since play console asked to target Android 14 (API level 34) #89

Open
riyansn opened this issue Feb 5, 2025 · 1 comment

Comments

@riyansn
Copy link

riyansn commented Feb 5, 2025

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)’ [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?

@riyansn riyansn changed the title Facing a bug after try to update into editor 2021 since play console asked to target Android 14 (API level 34) TrivialKart-unity: Facing a bug after try to update into editor 2021 since play console asked to target Android 14 (API level 34) Feb 5, 2025
@Nimbus19
Copy link

Just implement OnInitializeFailed(InitializationFailureReason error, string message)
while keeping OnInitializeFailed(InitializationFailureReason error)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants