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


potsa answered
    1. com.sdkbox.plugin does not exist.

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

    Thank you.

    router log in

    potsa edited answer

      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

              Question stats

              • Active
              • Views1541 times
              • Answers6 answers
              • Followers1 follower