In app with Unity 2019.2.21f1 (64-bit)

Hi everybody, please I need your help to update my App in google Play. I’m getting the following error:

“We’ve detected that this app uses an unsupported version of Play Billing. Please upgrade to version 5 (or later) of the Billing Library to publish this app.”

I’m working with Unity 2019.2.21f1 editor (64 bit). The problem is that it only allows me to update the billing library to version 2.2.2. Is there any other way to avoid this error without updating the editor? If I update the editor I practically have to make the game from the beginning due to compatibility issues.

Thank you very much for your comments and help.

Carlos

Afaik, the editor restriction is only a preference and has nothing to do with v5 of billing client.
We have our own implementation of Billing Client and based on that experience if you are ready for experimenting to make it work on lower unity versions, let’s start diving in.

  1. Download recent version of Unity IAP from latest unity editor
  2. Go the package caches and copy purchasing folder
  3. In your current project, remove the IAP package from package manager.
  4. Place the copied folder in Assets folder (I suppose you can event place it directly in Packages folder too)
  5. Try making a build

If you see any errors while building, do share the complete log under “CommandInvocationFailure”.

We understand how difficult it will be to upgrade/downgrade unity versions once everything is ready. So the above steps are worth trying to keep the same unity version. Let’s see how it goes!

Cheers,
VB Team

1 Like

Hello team, thanks for your answer.

I followed the steps:

1.- I downloaded the Package: com.unity.purchasing@4.9.2 from the Unity 2020.3.0f1 (64-bit) editor. It is the highest.
2.- I copied it to the package folder.
3- In my Unity 2019.2.21f1 (64-bit) project, I uninstalled the InApp 2.2.2 package
4.- I placed the copied folder in the Package folder of my project.

I got the following errors: See image

9075268--1255918--Screenshot_7.png

Ok, I did something else after I got the above errors:
1.- I downloaded the Package: com.unity.purchasing@3.0.1 from the Unity 2020.3.0f1 (64-bit) editor. Because I saw in the package manager that when you upgrade from InApp 2.x to 3.x you have to move some files to fix console errors.
2.- I copied it to the package folder.
3- In my Unity 2019.2.21f1 (64-bit) project, I uninstalled the InApp 2.2.2 package
4.- I placed the copied folder in the Package folder of my project and moved the files as indicated in the snapshot attached.

After that all the errors were gone and I was able to build the apk. But I don’t know if the com.unity.purchasing@3.0.1 is enough to avoid the google play billing error. By the way, there is no version 5 in Unity billing… so?

9075448--1255954--Screenshot_8.png
9075448--1255957--Screenshot_9.png

As per [this]( Unity IAP package 4.12.2 is now available page-2#post-8955147) post, they updated to v5 in 4.8.0.


- Google Play - Billing Library update from version 4.0.0 to 5.1.0 [Google Release Notes](https://developer.android.com/google/play/billing/release-notes). New Google Billing features are not supported yet, they will be included in a future major update.

Proceed downloading that version and try to put it back in 2019.4. We will see what issues exist and try to fix. Most likely there won’t be any android side issues. Even if issues exists, it’s solvable!

1 Like

Ok but where is the package? I can’t find it in the link above and not in Unity 2022.3.1f1

You can see it from package manager.

Yes but it’s not V5, its V4.9.2. That’s what I mean

Ok, I did it with V4.9.2, I get 4 errors, but I have no idea how to fix them because in this case there is no information on how to move files between folders… Do you have any idea how to solve it?

Thank you

9078727--1256530--Screenshot_10.png

Thats fine. It’s unity iap version which includes Billing client v5.

However, I tried the suggested steps myself and found out the following

  1. While V5 billing client library has some breaking changes, it’s not actually a requirement to have > 2019. Check point 3 why it’s not supported by unity.
  2. To overcome those breaking changes, I need to edit the .cs native interface files which I don’t think it’s worth it.
  3. They used C# 8.0 features extensively in the .cs files which is not supported in 2019.4 (I fixed it though by porting back). And I see now why Unity IAP don’t want to support 2019.x which is totally fair as these new C# 8 features make the code more robust with new operators.

Finally give a try by doing the following

  1. Remove the purchasing entry from Package/manifest.json and also delete purchasing folder under Packages(if you have done as per my suggestion earlier)
  2. Extract the attached zip in to a new folder (make sure you commit this folder to your git/version control as other team members need it too)
  3. Open package manager and install the above package by pointing package.json (install via disk option)

Give a try!

9079060–1256626–com.unity.purchasing@4.9.2.zip (5.23 MB)

1 Like

Sorry my friend, but I didn’t understand well :frowning: Maybe if because my poor English This is what I understood:

I recorded a short video:
https://drive.google.com/file/d/1HXsmPw8ps04wP_WtvwPZRvTGrYHFMvSU/view?usp=sharing

Ok. Do the following steps after you extracted the downloaded file shared above (Until 1.25 timestamp in video is correct).

  1. Copy the extract purchasing folder(4.9.0) to a folder named CustomPackages next to Assets folder.
  2. Now open Unity Package Manager from editor
  3. Click on left top + icon and Install the custom package from disk, point the CustomPackages/com.unity.purchasing@4.9.2/package.json file
  4. Done!

You don’t need to add any in manifest.json

1 Like

Ok, I did it. Now the console shows 30 erors

9080611--1256899--Screenshot_11.png

I tryed to do it again and got only 7 errors :smile: This is crazy :face_with_spiral_eyes:

I don’t see the error in my tests. Could you re-do this step again?

Maybe the reason is that you are using Unity 2019.4 and I’m using Unity 2019.2.21 or maybe is because I use the Simple In App System (SIS) that I bought a long time ago…https://flobuk.com/
I really don’t know

The problem with upgrading from 2019.2.21 to 2019.4 is that 2019.2.21 was the last one that supported GUIText and my game has many. I know I need to fix that, but I wanted to after uploading this version of my game.

Hello again. To fix this, I’m trying to update the game from Unity 2019.2.21f1 (64-bit) to Unity 2019.4.0f1 (64-bit). The problem is that Unity 2019.4.0f1 (64 bit) doesn’t support GUI anymore and my game has a lot of them and it would take a long time to migrate all interfaces from GUI to UI. So my question is: Is there a possibility to export the GUI package from Unity 2019.2.21f1 and import it into 2019.4.0f1 like we did with the InApp package? If I can still use GUITextures and GUIText in 2019.4.0f1, I think I might have a chance to upload the apk now.

I think if you need to upgrade to 2019.4, you need to set yourself for replacing GUITexture with UI.Image as the earlier got obsolete. I don’t see another alternative.

Hello again Voxel, One question: What version of the Unity editor are you using?
I tried your IAP 4.9.2 on an empty project and I get errors when I try to build the apk. I tested it on Unity 1019.4.40.f1 and Unity 1019.4.0f1

Without the IAP 4.9.2 package, it compiles correctly


Please click on commandInvocationFailure entry and pass the complete log.