Is it possible to create an APK using NSight Tegra VS plugin with both amreabi and armeabi-v7a architectures included, like when you specify both architectures in Application.mk? If not, can you suggest any workarounds, short of building my project without plugin’s help? I would really like my project to work on both types of devices without having to build separate packages for each architecture…
You can try the following:
- Move all your native code to a new project. Set its Configuration Type to Dynamic Library.
- Create two new VS configurations in that project: Debug_v5te and Debug_v7a.
- In each of the configs set the target architecture.
- Set the output path of each config to the main project’s libs folder, architecture-dependent subfolder.
- Create a build_libs.bat file which will build the library project in two configs.
- Set build_libs.bat as a main project’s Pre-Ant Event.
- Using VS’s configuration manager turn off library’s building.
I did these steps with HelloJni project and it worked for me, I was able to debug the native code. Here’s a sample build_libs.bat file contents to get you started:
@echo off set MSBUILD_PATH=C:\Windows\Microsoft.NET\Framework\v4.0.30319 %MSBUILD_PATH%\MSBuild.exe lib\lib.vcxproj /p:Configuration=Debug_v5te;Platform=Android %MSBUILD_PATH%\MSBuild.exe lib\lib.vcxproj /p:Configuration=Debug_v7a;Platform=Android
OK, I see. It’s a pity plugin can’t do it itself. I hope the feature will be added in future versions.