Search Issue Tracker
Fixed in 2018.1.X
Votes
5
Found in
2017.1.2f1
Issue ID
958379
Regression
No
[Android][Gradle] Unity purchasing classes are not included in Android Gradle builds
Unity.Purchasing classes are not included in Android builds produced using Gradle build system.
Steps to reproduce:
1) Open the attached project (958379_repro.zip).
2) Set build system to Gradle.
3) Add a new keystore.
4) Enable 'Proguard' option for Minify.
5) Build a non-Development build.
6) Run on a device.
- Monitor app output via logcat.
An error message is printed:
UnityIAP StandardPurchasingModule Version: 1.14.0
NotSupportedException: Failed to bind to native store: UnityEngine.AndroidJavaException: java.lang.ClassNotFoundException: com.unity.purchasing.googleplay.GooglePlayPurchasing
java.lang.ClassNotFoundException: com.unity.purchasing.googleplay.GooglePlayPurchasing
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at java.lang.Class.forName(Class.java:326)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source)
at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at com.unity3d.player.UnityPlayer$c.run(Unknown Source)
This does not happen when using the Internal build system.
Workaround:
Prevent the purchasing classes from being stripped by adding the following to Proguard file:
-keep public class com.unity.purchasing.*{
public ;
}
Reproduced on:
2018.1.0a5, 2017.1.0a3
Test device:
Samsung Galaxy S7 Android 7.0
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
ilterbilguven
Feb 01, 2018 11:51
Reproduced on 2017.3.0p3