Problem with Android chartboost cocos2d-x integration

I am using wenbin1988 tutorial [chartboost cocos2d-x integration] for my project.
I managed to get the project ready for ios and android.
The chartboost works fine in ios but has problem in android.
In android the chartboost is called but has no window opened and no advertisement displayed.
The error mentioned in eclipse is
02-22 19:35:44.520: D/PhoneWindow(18143): couldn’t save which view has focus because the focused view org.cocos2dx.lib.Cocos2dxGLSurfaceView@463440b0 has no id.
Can anyone please help to resolve the issue
Thanks in advance

I think for getting the focused view you will require this function. It will return you the focused view.

    private FrameLayout rootView = null;

    /* Helper method to get the hold of Cocos2dx Changable View,
     * You can add others views using this view
     */
    private FrameLayout GetRootView()
    {
        if (this.rootView == null)
        {
            this.rootView = (FrameLayout)this.getWindow().getDecorView().findViewById(android.R.id.content);
        }
        return this.rootView;
    }

More over for NDK and other stuff in Cocos2dx i have written a simple library, you won’t need to go into complexities of NDK. Use it and enjoy the integration with iOS and Android using their native languages :slight_smile:

Here is the link to the library
EasyNDK
EasyNDK Wiki Page

1 Like

Here is a complete guide on how to link chartboost with iOS and Android.

Thanks a lot :slight_smile:

No Probs :slight_smile: Do let me know if it worked as you wanted it to be.

Hello Sir, I m working on Easy NDK and there is an issue which has consumed 3 hours of my time.
Here is it.
I am dropping all the files that reside in the folders of
a - IOS NDK Helper
b- jansson and
c - NDK Helper

But whenever i compile my project in Xcode 4.5 the file name I@OSNDKHelper-C-Interface.h@ have an error iostream not found
The Sample Project works fine but i am not able to use it in my project.
Any Help will be greatly appriciated.

Thank You