Black screen on Android device (Nexus S)

Hi guys,

I am glad to join cocos2d-x club. I am a newbie to cocos2d-x. I have successfully build several samples on iOS. But I have trouble to build on Android.
I follow the tutorials to setup everything, and try to build hello-world on Android.

But I only see a black screen and nothing happened on my Google phone: Nexus S.

I have read these threads:
http://www.cocos2d-x.org/boards/6/topics/19443?r=19445#message-19445
http://cocos2d-x.org/boards/6/topics/12563

But they only have problem on emulator but not on device. My problem exists on both emulator and device, but I don’t find emulator’s advantage so I don’t plan to use it.

My environment:
Mac OSX 10.8
Eclipse
cocos2d-2.0-x-2.0.4
Android-NDK-R8C

Project Target: 4.2 (API 17), minSDK: API 8

I stumbled for days and can’t move forward, it’s terrible.:frowning: Help… Please. I’ll appreciate your guys’ help.:slight_smile:
Thanks

Can you post a zip of your android project? Just to see if something does not look quite right.

This is the project’s zip file:
https://docs.google.com/open?id=0B7mLZy0bxJuANFNWVW13THZoUG8

This is the cocos2d-x compiling log:

Thank you very much.

Managed to get it to build, but it does the same thing on my device :frowning: The logcat is saying that the application could not bind to jni…

The project looks alright and so do the cpp files! Can’t seen to tell what is different between that setup and the hello cpp sample…

I have managed to get the sample hello cpp to run with no issues though… so if you want to download it and use it as a starting point for your app then please feel free to do so.

https://docs.google.com/open?id=0B0Qc680ZQMaGUWt2cHUtdVh0M0U

Does the app crash?
Does .so be packed into apk file?

Thank you for help.

I guess it did not crash, for I did not see any Warning Popup Window and it stay there: black screen.

How to know the .apk including .so? which .so file? Sorry for I know little about Android.

The apk is just a zip file , you can rename it *.zip and unpack it or get a tool that will let you just look inside zip files without unpacking them. On the mac you can use zipeg for that. On windows there are a host of tools that let you do that e.g. winzip.