Amazon purchases are not supported

Hi there. I have a problem with using Unity IAP 2.2.2 on Amazon. When I run the game on Amazon Kindle, logs shows me an error “NotSupportedException: Failed to bind to native store: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.unity.purchasing.amazon.AmazonPurchasing”. I use Unity IAP on Android and iOS, but the problem is only on Amazon Kindle devices. By the way, it happens on Unity 2019.4.20f; Custom Gradle and Proguard are disabled. I also tried Unity IAP 2.0.2, 2.2.1.

1 Like

I’ve spent 3 days looking for a solution, and just found the cause of this problem: I always build the project using a TeamCity server and replace the file “BillingMode” with TeamCity scripts to build for different builds targets (iOS; Android). So, I replace this file at the path: “Assets/Plugins/UnityPurchasing/BillingMode.js”. But the correct path for Unity 2019.4.20 and higher is “Assets/Resources/BillingMode.js”. Pay your attention to the file content: it should be {"androidStore":"AmazonAppStore"}.

1 Like

Another solution: use the method UnityPurchasingEditor.TargetAndroidStore(targetStore) on your pre-build steps.
It’s safer than parsing BillingMode file.

1 Like