-
Notifications
You must be signed in to change notification settings - Fork 114
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
Play In-App Update Plugin needs update for Android 14 compatibility #236
Comments
This is a temporal solution, but I found this solution on StackOverflow. In short, what you need to do is find the
You need to put both. Then, go back to Unity, and use Force resolve. After that, the plugin is up-to-date and works in Android 14 -- just tested it. |
Hello @fer-gamboa, Thanks for sharing. For Android 14, the library crashes. So I use a cloud based setting that holds the latest version. On Android 14 devices this setting is checked and the user is prompted to update from play store. This is my workaround. However, it would be easier to use your suggestion if it backwards compatible. |
Hi @apar945! It actually works, I tested it on an Android 14, and on an Android 12 device. Regardless, it is a workaround, so I cannot vouch for its stability in the long-term. It seems to work for now. |
@fer-gamboa, Thank you for the additional information. I am trying to get this workaround to work. It leads to lots of duplicate libraries. I delete the duplicates but I still haven't managed to build successfully. Do all other google plugins also need changes in their dependencies? |
I managed to build the project with the changes by
With our next release candidate I will test in-app update on Android 14. I will provide an update once that is done. |
@fer-gamboa, I recently started testing for in-app updates and it still doesn't work for me. I wasn't using Android SDK installed with Unity so I switched to that. I am building for Android API 34 with API 28 as minimum supported. I have tried resolving external dependency manager and rebuilding. I get the following error on Android 14 and Android 12. So the changes have broken in-app updates that worked previously. Error getting app update info. UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.play.core.appupdate.AppUpdateManagerFactory |
Hi! I'm not really sure about the specifications of your project, so I'm a bit in the dark there. What I can suggest is that:
I haven't had any of these problems so far, so I hope my suggestion help. Good luck! |
Thank you for the pointers. What do the packages in your AndroidResolverDependencies.xml look like? Mine are as follows. The core, core-common, integrity and asset-delivery are old and haven't updated.
|
Hi @apar945 My However, just to be clear, you should not modify What you should do is go to: If that's not the problem, I really don't know what may be wrong for your specific case. I have it working on production without problem, and tested it on Androids 12-14. However, as I mentioned on my proposal... this is just a workaround; it may not be stable. The best thing would be for Google to provide an official update. |
@fer-gamboa, thank you for the response. I can confirm that I have done as described by you from the start. My question was around the versions of core, core common dependencies. They are still the old version rather than the current version. I was hoping they would be updated as well. I will continue looking further into this and post an update. Regards |
I finally got the update to work on Android 14 and older versions with your suggested changes to Dependencies.xml. For others benefit, this is how I fixed it. Note: If you need the in app review, asset delivery and other plugins which have newer versions available, you may run into the issues I noticed. This workaround is fine for me for now as I am not using the other plugins yet and I am hoping Google releases a new version of the plugin eventually which is in line all the other plugins that were updated. |
I currently have same issue with: Update your Play In-App Updates Maven dependency to an Android 14 compatible version! Your current Play In-App Updates library is incompatible with targetSdkVersion 34 (Android 14), which introduces a backwards-incompatible change to broadcast receivers. As a reminder, from August 31, Google Play requires all new app releases to target Android 14. Update to the latest library version dependency to avoid app crashes: https://developer.android.com/guide/playcore#java-kotlin-in-app-update 90 days after releasing this version of your app, you won't be able to release new versions containing this SDK version to production or open testing." For some reason (out of my understanding), I have modified the Assets/GooglePlayPlugins/com.google.play.appupdate/Editor/Dependencies.xml and have these changes updated in "Asset/Plugin/Android/mainTamplate". dependencies { I still have yellow warning when uploading internal testing version (got the red with previous production.) |
Hi @32nguyen!
What may be happening is that your old dependencies are not being removed and/or updated. Also, just be aware that this was a fix I did a while ago. I still have it working on production, but it's no guarantee that it'll not collide or clash with other dependencies you may have in your project. |
Thanks for your reminder. Yes, it works. It needs to clean up the google plugins. |
This solution worked for me. Thank you very much! |
I am glad that it works. To add, I believe that the latest version of In-App Update has already addressed this issue, making this solution unnecessary. |
Apps and games targeting Android 14 need to use the Play In-App Updates Library 2.1.0.
However, the latest version of the Play In-App Update Plugin, 1.8.1, depends on an older library version, 2.0.0. An update to this plugin is required to bump the dependency to the newer library version.
The text was updated successfully, but these errors were encountered: