class.dex
is too big. <sdk>\build-tools
folder contains an android-X.Y
subfolder. 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.