class.dex
is too big. <sdk>\build-tools
folder contains an android-X.Y
subfolder. Nsight Tegra Fast Deploy mechanism allows faster development by only updating native libraries on the device and not rebuilding the APK when nothing except the native code has changed. Nsight Tegra now modifies built APKs to enable Fast Deploy on the device side, which allows using Fast Deploy with APKs built with other build systems. APK hashing speed in Fast deploy mode has been greatly improved compared to earlier versions of Nsight Tegra.
To set up Fast Deploy properly, add folders with built native libraries (preferably stripped) to the Deployment > Library Override Folders project property. If some of the libraries never change during the development process, it’s possible to make Fast Deploy ignore them by adding their names (including the lib
prefix and extension) to the Deployment > Libraries to Ignore project property.
Fast Deploy mechanism looks for the libraries in the Deployment > Library Override Folders and in the subfolders that have names based on the architecture of the device selected for debugging. This makes it possible to specify Ant or Gradle build’s native library root folder (that contains architecture-based subfolders) as Fast Deploy library override folder, and the libraries from the correct subfolder will be used during the deployment step. Nsight Tegra automatically supplies that folder for projects built with Nsight Tegra build systems (both MSBuild and ndk-build based). When searching for library named libLibrary.so
, Fast Deploy also accepts and prefers file named stripped_libLibrary.so
if it finds it.
Fast Deploy doesn’t currently work for 64-bit apps, but works for both x86 and ARM apps, even when run on a 64-bit device. Deployment > Fast Deploy is Default by default, which in this version of Nsight Tegra means No for External Build System projects and Yes for all the other ones. However, it is possible to manually configure External Build System projects to work with Fast Deploy.
On some systems, ANT will report a memory error when building inside of Visual Studio. You may encounter the following error:
Could not create the Java virtual machine.
Error occurred during initialization of VM
Could not reserve enough space for object heap
In this case, try restarting your web browser; it has been known to help in some cases.
AndroidBuild
tag instead of None, for example:
<AndroidBuild Include="res\values\strings.xml" />
<None Include="res\values\strings.xml" />
.prop
files, that those values are up to date. For instance, in later releases of Nsight Tegra. we have removed support for certain SDKs and NDKs that were previously supported.
gdb.setup
directory command generation when the project is built using an *.mk
file. You must modify the *.mk
file manually to establish the correct directory command arguments. Please consult the Google NDK documentation at <ndk-path>/docs/ANDROID-MK.HTML
or APPLICATION-MK.HTML
for more assistance. (19518) *.exe
files rather than *.apk
files. (19867)Note that this issue only occurs in Visual Studio 2010, it does not occur in Visual Studio 2012.
src
will not build. To work around this, you can modify the Java Source Directory property in the Ant Build section. (19489) ndk-build.cmd
, there is an extra "/" in the command line which is sent to the compiler and prevents breakpoints from being hit. To work around this issue, modify your Android.mk
file from: LOCAL_PATH := $(call my-dir)
LOCAL_PATH := $(subst //,/,$(call my-dir)
Recent releases of Nsight Tegra have made the following changes:
build.xml
and *.properties
files are no longer required for a project to build. These files can be safely removed if their customization is not needed.*.properties
, AndroidManifest.xml
, or build.xml
are no longer modified. This is because it was a frequent issue for people using source control systems. Tegra-Android\<config>
.Nsight Tegra has its own proprietary build.xml
— named nsight_tegra_build.xml
— that runs before the build.xml
, and sets properties from within Visual Studio’s project properties. There are two reasons for doing this:
.properties
and build.xml
files.To work around this issue and get your forced overrides back in, you would take advantage of these lines that we auto-generate:
<import file="<path>\nsight_tegra_build_overrides_<config>.xml" optional="true" />
<import file="<path>\nsight_tegra_build_overrides.xml" optional="true" />
The first line allows you to do config-specific overrides; the second line contains shared overrides.
From here, you would set your properties, making sure to get the paths you set up in Visual Studio.
manifest.xml
, making a minor edit to fix the SDK target/min/max numbers.build.xml
will be imported to pick up the rest.For reference, here is a snip of the actual properties that are overridden.
REGION-BEGIN: The following properties prevent Nsight Tegra from needing to modify user property files.
Setting them here will ensure they always match Visual Studio and allows users to build without needing to check out version controlled files.-->
<property name="sdk.dir" value="C:\NVPACK\android-sdk-windows" />
<property name="target" value="android-15" />
<property name="source.dir" value="src" />
<!--REGION-END-->
<!--
REGION-BEGIN: The following properties prevent Nsight Tegra from needing to modify user manifest files.
Setting them here will ensure they always match Visual Studio and allows users to build without needing to check out version controlled files.-->
<property name="manifest.file" value="C:\<path>\nsight_tegra_manifest.xml" />
<property name="manifest.abs.file" value="C:\<path>\nsight_tegra_manifest.xml" />
<!--REGION-END-->
<!--
REGION-BEGIN: The following properties allow Nsight Tegra to maintain build results per-configuration (debug, release, etc).-->
<property name="gen.absolute.dir" value="C:\<path>\Tegra-Android\Debug\gen" />
<property name="out.dir" value="C:\<path>\Tegra-Android\Debug\bin" />
<property name="jar.libs.dir" value="C:\<path>\Tegra-Android\Debug\libs" />
<property name="native.libs.absolute.dir" value="C:\<path>\Tegra-Android\Debug\libs" />
<target name="-pre-compile">
<path id="project.all.jars.path">
<path path="${toString:project.all.jars.path}">
<fileset dir="${jar.libs.dir}">
<include name="*.jar" />
</fileset>
</path>
</path>
</target>
<!--REGION-END-->
<!--
Reference in original document.-->
<import file="C:\<path>\build.xml" />
</project>
NVIDIA® GameWorks™ Documentation Rev. 1.0.211026 ©2014-2021. NVIDIA Corporation and affiliates. All Rights Reserved.