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
- [Android] Crash on startup when Depth Stencil Format is set to S8_UINT
- Multiple errors occur when setting the Render Object Event to AfterRenderingPostProcessing while using STP for Upscaling
- UnityYamlMerge.exe doesn't correctly handle merge conflicts in modified properties on a prefab variant
- Inconsistent color scheme in "Details" section of "Select Presets" inspector window
- Crash on __pthread_kill when launching Editor via command-line with "-disableManagedDebugger" argument
ilterbilguven
Feb 01, 2018 11:51
Reproduced on 2017.3.0p3