0

Hi,

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 2.4.1.1 (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

Thanks!

potsa answered
    0
    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
      0

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

      Happy Wheels answered
        0

        Thanks. I was able to build for Android.

        192.168.0.1

        Steven A answered
          0

          thanks for sharing

          Abc assignmenthelp answered
            0

            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:
            <project_root>/proj.android/app/libs/PluginIAP.jar
            <project_root>/proj.android/app/libs/sdkbox.jar

            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:
            cocos/platform/android/java/libs/PluginIAP.jar
            cocos/platform/android/java/libs/sdkbox.jar

            clean -> rebuild -> success!

            parrieta83 edited answer

              Question stats

              • Active
              • Views1541 times
              • Answers6 answers
              • Followers1 follower

              Categories