[Closed] Amazon NotSupportedException: Failed to bind to native store

Hello,

I’m trying to port my application to amazon store and i followed Unity instructions to configure In-app for Amazon but when i changed options to Unity IAP → Android ->Target Amazon and build SDK, this error i shown on start:

NotSupportedException: Failed to bind to native store: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.unity.purchasing.amazon.AmazonPurchasing

I tried updating Unity IAP, downloaded new Unity Android plugin, downloaded all updates from Android Studio SDK Manager, downloaded amazon sdk, but nothing seems to work.

Also to mention, I’m building apk with Android Studio from Gradle export.

Thanks in advance.

Are the other stores initializing OK? Can you provide the Device logs? Can you test by using Unity Build and Run, not using Gradle?

When I change Unity IAP to Target Google Play, everything works fine. Our App is live on Play Store. I can provide screenshot from game with errors, but can I do it privately? Unfortunately I can’t build with Unity.

Why can’t you build from Unity, do you get errors? That may provide additional information. You are welcome to open a support ticket, please go the Support tab in your Analytics Dashboard

This issue looks similar to this post also [Solved] On the Android device appears error "filed to bind to native store" after updating

Do you have the AmazonAppStore compile directive in your build.gradle file?

Are you asking do I have AmazonAppStore.aar file in libs folder? Because I just realized I do have it, but in build.gradle I didn’t write
compile(name: ‘AmazonAppStore’, ext:‘aar’)

But now that I do, I get errors like

java.lang.IllegalArgumentException: already added:

Could you please explain me what exactly I need to do?

No, there is no need to add it manually. I simply chose Export project from Unity after selecting AmazonStore as the target from the menu - Window/UnityIAP/Android/Target Amazon. Please test with a new project with IAP added only, and Export the project, and provide your build.gradle file here.