Minimum tool chain for sdkbox / android

I have not updated anything in eclipse or its supporting tools for about 2 years (long development). I am still using cocos 2.2.6.

Now that I am trying to use sdkbox iap, I am getting many unexplained errors. Compiler doesnt recognise ‘override;’ at the end of a virtual in a class definition being one example.

I am wondering if my compiler and any other out of date parts are incompatible with sdk box.

What is the minimum environment, compiler, ndk etc for sdk box iap ?

Thanks

2.2.6 is the lowest version sdkbox supports, we tested on 2.2.6 before each release.

if you have any problem, make sure to post the error log, and we can help you out :slight_smile:

Ok, thanks, here is what happens if I call sdbox init

08-01 06:58:41.953: D/AndroidRuntime(801): Shutting down VM
08-01 06:58:41.953: W/dalvikvm(801): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
08-01 06:58:41.963: E/AndroidRuntime(801): FATAL EXCEPTION: main
08-01 06:58:41.963: E/AndroidRuntime(801): java.lang.NullPointerException
08-01 06:58:41.963: E/AndroidRuntime(801): at com.sdkbox.plugin.util.iap.IabHelper.startSetup(IabHelper.java:267)
08-01 06:58:41.963: E/AndroidRuntime(801): at com.sdkbox.plugin.SDKBoxIAPGooglePlay.initWithKey(SDKBoxIAPGooglePlay.java:271)
08-01 06:58:41.963: E/AndroidRuntime(801): at com.sdkbox.plugin.SDKBoxIAPGooglePlay$1.run(SDKBoxIAPGooglePlay.java:107)
08-01 06:58:41.963: E/AndroidRuntime(801): at android.os.Handler.handleCallback(Handler.java:725)
08-01 06:58:41.963: E/AndroidRuntime(801): at android.os.Handler.dispatchMessage(Handler.java:92)
08-01 06:58:41.963: E/AndroidRuntime(801): at android.os.Looper.loop(Looper.java:137)
08-01 06:58:41.963: E/AndroidRuntime(801): at android.app.ActivityThread.main(ActivityThread.java:5041)
08-01 06:58:41.963: E/AndroidRuntime(801): at java.lang.reflect.Method.invokeNative(Native Method)
08-01 06:58:41.963: E/AndroidRuntime(801): at java.lang.reflect.Method.invoke(Method.java:511)
08-01 06:58:41.963: E/AndroidRuntime(801): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-01 06:58:41.963: E/AndroidRuntime(801): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-01 06:58:41.963: E/AndroidRuntime(801): at dalvik.system.NativeStart.main(Native Method)
08-01 06:58:42.003: E/sdkbox(801): getFingerprintString(build): 00000000 00
08-01 06:58:42.053: E/sdkbox(801): getFingerprintString(androidid): eaeca02670d1fe5c
08-01 06:58:42.053: E/TrackingInfo(801): Failed to access wifi, need ACCESS_WIFI_STATE perms?
08-01 06:58:42.053: E/sdkbox(801): getFingerprintString(macaddress): mac-address-unavailable

thanks again for any thoughts
rapper

Can I see the permissions in your AndroidManifest.xml?

I noticed I had missed out the top line, which looks significant…

08-02 08:58:26.513: I/SDKBox(775): class name : ----com/sdkbox/plugin/SDKBoxIAPGooglePlay----
08-02 08:58:26.523: D/AndroidRuntime(775): Shutting down VM
08-02 08:58:26.523: W/dalvikvm(775): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
08-02 08:58:26.533: E/AndroidRuntime(775): FATAL EXCEPTION: main
08-02 08:58:26.533: E/AndroidRuntime(775): java.lang.NullPointerException
08-02 08:58:26.533: E/AndroidRuntime(775): at com.sdkbox.plugin.util.iap.IabHelper.startSetup(IabHelper.java:267)
08-02 08:58:26.533: E/AndroidRuntime(775): at com.sdkbox.plugin.SDKBoxIAPGooglePlay.initWithKey(SDKBoxIAPGooglePlay.java:271)
08-02 08:58:26.533: E/AndroidRuntime(775): at com.sdkbox.plugin.SDKBoxIAPGooglePlay$1.run(SDKBoxIAPGooglePlay.java:107)
08-02 08:58:26.533: E/AndroidRuntime(775): at android.os.Handler.handleCallback(Handler.java:725)
08-02 08:58:26.533: E/AndroidRuntime(775): at android.os.Handler.dispatchMessage(Handler.java:92)
08-02 08:58:26.533: E/AndroidRuntime(775): at android.os.Looper.loop(Looper.java:137)
08-02 08:58:26.533: E/AndroidRuntime(775): at android.app.ActivityThread.main(ActivityThread.java:5041)
08-02 08:58:26.533: E/AndroidRuntime(775): at java.lang.reflect.Method.invokeNative(Native Method)
08-02 08:58:26.533: E/AndroidRuntime(775): at java.lang.reflect.Method.invoke(Method.java:511)
08-02 08:58:26.533: E/AndroidRuntime(775): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
08-02 08:58:26.533: E/AndroidRuntime(775): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
08-02 08:58:26.533: E/AndroidRuntime(775): at dalvik.system.NativeStart.main(Native Method)
08-02 08:58:26.553: E/sdkbox(775): getFingerprintString(build): 0a0a00a0a000 00
08-02 08:58:26.583: E/sdkbox(775): getFingerprintString(androidid): eaeca02670d1fe5c
08-02 08:58:26.642: E/TrackingInfo(775): Failed to access wifi, need ACCESS_WIFI_STATE perms?
08-02 08:58:26.642: E/sdkbox(775): getFingerprintString(macaddress): mac-address-unavailable

here is the manifest

<?xml version='1.0' encoding='UTF-8'?>
<uses-sdk android:minSdkVersion="14" />
<uses-feature android:glEsVersion="0x00020000" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.android.vending.BILLING"/>

<application android:icon="@drawable/icon" android:label="@string/app_name">

    <activity android:configChanges="orientation" android:label="@string/app_name" android:name=".myappname" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" />

//
//

Just some more info,

in myapp.java i had
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
SDKBox.init(this);
}

following some comments on this board i have removed the sdkbox.init(this) call

now, no crash, I am just using SDKBox::IAP::init()

when calling that

i get output saying no asset manager, then
I get the error failed to find config file, then a complete crash

Following other threads I have manually moved the json file around into bin/res - no joy
/res - refuses to build - “invalid resource directory name”

it is being copied from my main resources folder to the assets folder upon build

the error i am getting, is this only caused by not finding the json file, i note on another thread you say this can also be due to sdk box not initing properly ?

any suggestions?