0

Hi,

Im using Unity 4.7.2 and SDKBox IAP 1.3.15 (latest) . I followed all the instructions and when initializing or trying to getProducts or purchase i have this error:

Init:

03-16 00:50:24.748: I/Unity(25121): SDKBOX IAP starting.
03-16 00:50:24.748: I/Unity(25121):
03-16 00:50:24.748: I/Unity(25121): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 56)
03-16 00:50:24.864: I/Unity(25121): AndroidJavaException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.OmniFunGames.SpaceDriftEventHorizon-1/base.apk"],nativeLibraryDirectories=[/data/app/com.OmniFunGames.SpaceDriftEventHorizon-1/lib/arm, /data/app/com.OmniFunGames.SpaceDriftEventHorizon-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]] couldn't find "libsdkbox.so"
03-16 00:50:24.864: I/Unity(25121): at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
03-16 00:50:24.864: I/Unity(25121): at UnityEngine.AndroidJNISafe.CallStaticVoidMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0
03-16 00:50:24.864: I/Unity(25121): at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
03-16 00:50:24.864: I/Unity(25121): at UnityEngine.AndroidJavaObject.CallStatic (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
03-16 00:50:24.864: I/Unity(25121): at Sdkbox.SDKBOX.create () [0x00000] in <filename unknown>:0
03-16 00:50:24.864: I/Unity(25121): at Sdkbox.SDKBOX.get_Instance () [0x00000] in <filename unknown>:0
03-16 00:50:24.864: I/Unity(25121): a
03-16 00:50:24.869: I/Unity(25121): About to refresh
03-16 00:50:24.869: I/Unity(25121):
03-16 00:50:24.869: I/Unity(25121): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 56)
03-16 00:50:24.870: I/Unity(25121): About to getProducts, will trigger onProductRequestSuccess event
03-16 00:50:24.870: I/Unity(25121):
03-16 00:50:24.870: I/Unity(25121): (Filename: ./artifacts/AndroidManagedGenerated/UnityEngineDebug.cpp Line: 56)

Error:

03-16 00:50:25.572: E/Unity(25121): Unable to find iap
03-16 00:50:25.580: E/Unity(25121): Unable to find iap
03-16 00:50:25.593: I/Unity(25121): DllNotFoundException: iap
03-16 00:50:25.593: I/Unity(25121): at (wrapper managed-to-native) Sdkbox.IAP:sdkbox_iap_refresh ()
03-16 00:50:25.593: I/Unity(25121): at Sdkbox.IAP.<refresh>m__7 () [0x00000] in <filename unknown>:0
03-16 00:50:25.593: I/Unity(25121): at UnityEngine.AndroidJavaRunnableProxy.run () [0x00000] in <filename unknown>:0
03-16 00:50:25.593: I/Unity(25121): at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
03-16 00:50:25.593: I/Unity(25121): Rethrow as TargetInvocationException: UnityEngine.AndroidJavaRunnableProxy.run()
03-16 00:50:25.593: I/Unity(25121): at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
03-16 00:50:25.593: I/Unity(25121): at UnityEngine.AndroidJavaProxy.Invoke (System.String methodName, UnityEngine.AndroidJavaObject[] javaArgs) [0x00000] in <filename unknown>:0
03-16 00:50:25.593: I/Unity(25121): at UnityEngine._AndroidJNIHelper.InvokeJavaProxyMethod (UnityEngine.AndroidJavaProxy proxy, IntPtr jmethodName, IntPtr jargs) [0x00000] in <filename unknown>:0
03-16 00:50:25.593: I/Unity(25121):
03-16 00:50:25.593: I/Unity(25121): (Filename: Line: -1)

 

When trying to use purchase method its same error "Unable to find iap" and then DllNotFoundException.

What i can do about it? Is there a workaround or anything for this problem? We really need IAP, we have almost finnished game and this issue is holding us.

miya bhai answered
    0

    +1 I would like to be able to get the purchase receipt information as well. This seems like it ought to be a low-hanging fruit.

    Lea Hayes answered
      1

      Hi,

      after a while of trial and error i managed to fix this issue. It turns out that  "DllNotFoundException: iap" Info doesnt have to do anything with "Unable to find iap" error.

      Problem of unable to find iap is withing folder structure. In unity package all lib fies (.so for example) are directly under plugins/android folder. You need to copy of all folders/files  of sdk lib files from plugins/android to plugins/android/libs/* manually.

      Files listing in unity asses store shows proper folder structure wheras in unitypackage you download lacks libs folder and instructions are not fully covered.

      But finally IAP works now! Thanks for reply!

      Btw are there maybe some plans to expand API to get information about purchase status, to check if user refunded in particular ?

      Lea Hayes commented
        • Congratulations :) are you able to provide a link to your new game? I'd love to see what you've come up with!

        Question stats

        • Active
        • Views2047 times
        • Answers2 answers
        • Followers1 follower

        Categories