Codeless buttons failing in android only

Hello,

I have a few buttons in game meant to purchase in-game currency. The setup is working well for iOS and in the Unity Editor, but on Android, the buttons have no effect. I should also note that in previous builds, this setup has worked for Android, but I can’t pinpoint when things broke.

These error logs seem to reveal the key issue, with it failing during initialization as the app launches, and then failing to add or remove the functionality from the buttons when we get to the store page.


I’m using IAP 5.0.1 and EDM4U 1.2.186. I’ve tried force resolving the android package, changing code stripping levels, and manually adding the billingclient dependency line to the manifest (though I’m not sure what the correct version number to add would be–I’m out of my depth when it comes to that). I’ve also tried building from both my mac and my pc, if that matters.

Any help would be much appreciated!

Hi @dtmeints

A few questions :slight_smile: If you could tell me get which version of IAP you’re using, as well as your Unity Editor version. It would also be helpful if you could tell me which IAP version you were using for your successful builds.

Hi Sasha, I’m using IAP 5.0.1 presently, I’m not sure what it was before, but I think 4.8 something. I updated to 5.01 specifically because it stopped working seemingly on its own while on that version, though. Unity Editor version is 6000.0.47f1

Was the project always on Unity 6?

Yes, I think I’ve been using this same version since the project started

Update: I updated to unity 6000.2.6f2, and the problem is still the same.

Ok :thinking: When you say “because it stopped working seemingly on its own while on that version” re: IAP 4.8.0, do you mean that you were running into the same issue you’ve specified in this thread, or was there a different issue happening with 4.8.0?

No, just that I had been using 4.8 (I think), and this problem (the buttons not working due to what seems like failed IAP initialization on Android), started while I was still on the last version, despite that I’ve avoided touching the code and scene. I updated to 5.0.1 in an attempt to fix the issue.

I found the solution, I had to add this line to the Proguard file:

-keep class com.android.billingclient.** {*; }