Importing NDK samples into Nsight for Visual Studio


I am wondering anybody had any success importing NDK samples into Nsight Tegra project for VS2010.

VS2010 Sp1
Nsight 1.5.1
Samsung Android Tablet and Phone

[Samples used]
a) Import a Makefile-based Android Project
b) Import an Android Project

Import using a) was straight forward without error and compiles and install/run fine on Android device. The only draw-back is I can’t do run-time debug due to broken header (I think…)

For b) it added two files a loadlibrary in JNI and class file src which I removed before compiling. Also added is Linker\Input= c;m;log;gcc;GLESV2
Run-time debug works fine in b) but when apk runs on Android device the screen is always blank. Why is that?

Using a) cannot run-time debug, apk runs fine
Using b) Can run-time debug, apk ends up with blank screen

Any suggestion would be great, thanks.


Hi cheeseberrybeefcake,
It seems that you use a little version of Nsight Tegra.Currently the release is 1.6.
For importing NDK Samples,
a) Should work well.
b) Be used for adding native code for existing pure java code project.

You can try with the latest version, if any further issue, come to another topic But Our tools is guaranteed on tegra-based device, non-tegra device is out of reach.

Hi victorli,

Thank you for your feedback.


I did the Nsight Tegra 1.5.1 to 1.6 upgrades, and the end result still remained the same.
Attached is the NDK hellogl2 using the ‘Import an Android Project’.
It should be something in the project settings which I’m clueless at the moment. Ideas anybody? (1000 KB)

hi cheeseberrybeefcake,
NDK hellogl2 is ndk-build project, You should use “Import an ndk-build android Project” instead of “Import an Android Project”,which is used for adding native code for existing pure java code project.


Hi victor,

It seem to work now. I believe it needs a reboot on the device, if it still doesn’t work then proceed to change the lib input to only log;GLESv2 recompile and deploy.

hi cheeseberrybeefcake,
it seems that you manually change ndk-build mk-based project into Nsight-Tegra msbuild project. it needs some skills and efforts. glad to see you made it.

but with “import an ndk-build android Project”, There is almost no effort except clicking buttons. And Nsight Tegra would trigger ndk-build mk project as the original project.