Comments (11)
This is a temporal solution, but I found this solution on StackOverflow.
In short, what you need to do is find the Dependencies.xml
file located at GooglePlayPlugins/com.google.play.appupdate/Editor
and change it as follows:
<dependencies>
<androidPackages>
<androidPackage spec="com.google.android.play:app-update:2.1.0"/>
<androidPackage spec="androidx.activity:activity:1.6.0" />
</androidPackages>
</dependencies>
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.
from play-unity-plugins.
Hello @fer-gamboa,
Thanks for sharing.
Is your workaround backwards compatible with Android 13 and older versions?
I have an app for which in app update works for Android 13 and older versions using this plugin.
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.
from play-unity-plugins.
Hi @apar945! It actually works, I tested it on an Android 14, and on an Android 12 device.
Moreover, I have it live in one of my current apps and have received no crash reports associated with this feature so far--and yes, have pushed some updates since releasing it.
Regardless, it is a workaround, so I cannot vouch for its stability in the long-term. It seems to work for now.
from play-unity-plugins.
@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?
from play-unity-plugins.
I managed to build the project with the changes by
- By updating unity 2021 version to current 2021.3.36f1
- Updating google plugins to latest 2024 releases from here (https://developers.google.com/unity/archive#play_asset_delivery)
- After updating google plugins, the unity project settings for Android are now forced to use Custom Main Gradle Template, Custom Gradle Properties Template.
With our next release candidate I will test in-app update on Android 14. I will provide an update once that is done.
from play-unity-plugins.
@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
at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00000] in <00000000000000000000000000000000>:0
at Google.Play.AppUpdate.Internal.AppUpdateManagerPlayCore..ctor () [0x00000] in <00000000000000000000000000000000>:0
at Google.Play.AppUpdate.Internal.AppUpdateManagerInternal..ctor () [0x00000] in <00000000000000000000000000000000>:0
at Google.Play.AppUpdate.AppUpdateManager..ctor () [0x00000] in <00000000000000000000000000000000>:0
at WelcomePanel+d__89.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
from play-unity-plugins.
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'm also using another SDK, so that shouldn't be a problem.
- Make sure you activate the custom manifest and gradle templates. You may need this to double-check that the dependencies have not been replaced by another import.
- You may (conditional here) need to manually delete and reinstall the gradle dependencies for it to build correctly. What happened to us once was that because they have different versions, the folder names (of the dependencies) are different, so the old ones don't get replaced nor deleted... they just remain there, causing this problem.
I haven't had any of these problems so far, so I hope my suggestion help. Good luck!
from play-unity-plugins.
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.
<dependencies>
<packages>
<package>androidx.activity:activity:1.6.0</package>
<package>com.google.android.play:app-update:2.1.0</package>
<package>com.google.android.play:asset-delivery:2.2.1</package>
<package>com.google.android.play:core:1.10.3</package>
<package>com.google.android.play:core-common:2.0.0</package>
<package>com.google.android.play:integrity:1.0.0</package>
</packages>
from play-unity-plugins.
Hi @apar945
My AndroidResolverDependencies.xml
has far more than yours, but the app-update
one is correct.
However, just to be clear, you should not modify AndroidResolverDependencies.xml
directly; doing so will leave the old version (of the dependency we're trying to update) on the plugin. Then, the dependencies manager will download both versions into your project (namely, the one required by the plugin, and the one forcefully added to AndroidResolverDependencies.xml
), thus producing the clash.
What you should do is go to: GooglePlayPlugins/com.google.play.appupdate/Editor
and find a file that is called Dependencies.xml
(note that it doesn't have anything else in the name). This file is for the specific plugin (namely, App Update). Change the version there to upgrade the plugin. Once done, try resolve, but do not edit AndroidResolverDependencies.xml
manually.
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.
from play-unity-plugins.
@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
from play-unity-plugins.
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.
I ended up deleting all the google plugins except EDM from the project. Then I only added the latest in-app update plugin version 1.8.1 published Sept,2022 at the time of writing this message. The plugin package added the core, common and app bundle plugins itself.
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.
from play-unity-plugins.
Related Issues (20)
- [Play Asset Delivery] 1 Assetpack - Multiple AssetBundles HOT 3
- Issue in InAppUpdate plugin unable to detect User Interaction in App update Popup
- Android apk release play consoleGoogle Unity installation
- Screenshot (Sep 28, 2023 7:35:21 AM)
- Downloads gets stuck from Google play side
- JNI Global Reference Overflow Bug
- Duplicate class com.google.android.play.core.common.IntentSenderForResultStarte HOT 4
- App update rejected due to error on asset pack download : Error(-13) HOT 2
- BundletoolHelper.BuildApkSet doesn't sign apks
- Google Play In-App Review API - Error posting review "Expected UNIVERSAL BIT STRING, but found UNIVERSAL SEQUENCE"
- AssetModuleException: Session not found HOT 14
- Build Problem on CI by Docker
- Pad Issue After Download HOT 1
- Unity 2022.3.14f1 requires com.google.android,play:asset.delivery version 2.1.0 HOT 3
- Asset Delivery : Bundles can't restart/continue downloading after interrupting it in notification bar HOT 11
- Issue with Google Play Games PC InputSDK Integration in Unity
- Crash MissingForegroundServiceTypeException HOT 1
- Unity 2021.3.34f1 used last play asset delivery libs HOT 1
- One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from play-unity-plugins.