Using sdkbox-gui 1.1.7 I've added IAP plugin (v2.4.1.1) to my cocos2d-x project.
However, when I load the Android Studio project, it won't build anymore.
I get the following error: Error:(30, 51) error: package com.sdkbox.plugin does not exist.
(error details https://www.dropbox.com/s/mtqcqw8n4rezwco/the%20error.png?dl=0)


I've also tried command line installation, with no luck.
I've even followed the "Manual Integration" instructions from http://docs.sdkbox.com/en/plugins/iap/v3-cpp/.

However, I cannot find "PluginGooglePlay.jar" inside plugin/android/libs folder for IAP (see https://www.dropbox.com/s/mxvp94c1opzr6ig/missing_lib.png?dl=0)
Is the documentation out-dated? Or there's a missing file there?


I've tried a new cocos2d-x blank "HelloWorld" project (created from the console, using cocos 3.17).
The new project builds and runs for Android device, until I integrate the IAP plugin. Then, it stops building (with the same error - "package com.sdkbox.plugin does not exist").


Any help is more than welcome


Happy Wheels answered

    happy wheels
    You try to make me cry but I cried to much. U want me to suffer & breaking heart.

    Happy Wheels answered

      Thanks. I was able to build for Android.

      Steven A answered

        thanks for sharing

        Abc assignmenthelp answered

          Hi@htlxyz , thanks for your response!

          I was finally able to build for Android.

          As you said, I had to copy sdkbox::IAP libs into:

          That fixed the "package com.sdkbox.plugin does not exist" error.

          However, a new error appeared:

          Error:Execution failed for task ':Test:transformClassesWithMultidexlistForDebug'.
          com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

          Maybe this is also a "thing" when building with Android Studio...
          To fix it, I had to enable multidex in the project (by following https://developer.android.com/studio/build/multidex):

          1- In proj.android/app/AndroidManifest.xml, I had to add android:name="android.support.multidex.MultiDexApplication" inside application tag
          2- In proj.android/app/build.gradle add "multiDexEnabled true" under defaultConfig, and add 'com.android.support:multidex:1.0.3' under dependencies.

          And that give another error:

          Error:Execution failed for task ':Test:transformClassesWithMultidexlistForDebug'.
          > java.io.IOException: Can't write [..] (Can't read [../sdkbox.jar(;;;;;;**.class)] (Duplicate zip entry [sdkbox.jar:com/sdkbox/reflect/JNICallable.class]))

          But that was because of the duplicated jar files, so I had to delete the original jar files copied by the plugin installer:

          clean -> rebuild -> success!

          parrieta83 edited answer
            htlxyz 1.99K Rep.
            1. com.sdkbox.plugin does not exist.


            Android Studio not find sdkbox.jar at path proj.android/app/libs


            2. I cannot find "PluginGooglePlay.jar"


            now, we use Google's lib BillingClient, as you see, the billing-1.0.jar inside plugin/android/libs,

            you as Android Studio, so you can ignore billing-1.0.jar file,

            and add depedency to proj.android/app/build.gradle,


            dependencies {
            implementation 'com.android.billingclient:billing:1.0'


            this is a 3.17 cpp project sample:



            by the way, you import iap to the 3.17 empty project will failed? reproduce steps? did you change the something before import?

            parrieta83 commented
              • Yes, import iap to an empty 3.17 project failed for me too.

                Repro steps:
                1- $cocos new Test -p com.Test -l cpp -d ./
                2- $cd Test
                3- $sdkbox import iap
                4- Open proj.android with Android Studio, and try to build the project

                cocos version 3.17
                sdkbox iap v2.4.1.1
                Android Studio 3.0

                Moving libs into the project folder and enabling multidex fixed the issue on the Test project too (see my response for more details).

                Thanks again!

              Question stats

              • Active
              • Views1226 times
              • Answers5 answers
              • Followers1 follower