Compiling the Samples


TADP-Installed Samples Pack Workspace

For developers who installed this pack via the TADP installer, the provided Eclipse workspace in the TADP NVPACK tree will already include the samples. They are ready for immediate use.

Re-Using an Existing Samples Workspace

Preparing the Existing Workspace

Developers who used the Tegra Android Tools pack to install the new samples pack on top of an existing (old) TADP install can replace the previous samples in the default Eclipse workspace as follows. While the existing TADP-created samples workspace can be re-used, to prepare this workspace for the new samples, we must clear out the old samples to avoid confusion or overlap/collision.

  1. Open Eclipse to the TADP-created samples workspace.
  2. Select all of the existing samples projects in the Project Explorer tree view.
  3. Right-click and select Delete.
  4. Ensure that Delete project contents on disk is NOT checked, so that the projects themselves are not removed.
  5. Click Okay to clear these projects from the workspace.

This will provide an empty but configured workspace, ready to import the samples from the new pack.

Importing the Samples/Demos

Once a workspace has been prepared, it is possible to import the existing application projects that ship with this pack.

  1. Import projects by selecting File->Import->General->Existing projects into workspace.
  2. Select the NVIDIA Android samples root (the path to nvidia_tegra_android_samples_preview/).
  3. Ensure that the option Copy projects into workspace is NOT checked.

(Optional) Setting Up the Eclipse Workspace Manually

Developers who have used the previous method of re-using the TADP workspace should not follow this section, but should skip ahead to importing the projects.

NVIDIA strongly recommends using the existing TADP workspace, as it is already set up and ready to delete the previous applications and import the new ones. However, if a new workspace must be created from scratch, the steps are as follows:

  1. Create a new workspace (in Eclipse click File > Switch Workspace > Other…).
  2. Select the menu Window > Preferences > Java > Build Path > Classpath Variables, and add ANDROID_JAR with the path to the android.jar.
    For example C:\android\android-sdk-windows\platforms\android-8\android.jar.
  3. Set the path to the Android SDK via the menu Window > Preferences > Android > Android SDK Location.
    For example c:\android\android-sdk-windows.
  4. It is recommended that Project > Build Automatically be disabled, as it can cause failed builds.
  5. Follow the import instructions in the previous section.

Building the Samples/Demos

Build everything by selecting Project > Build All.

WARNING: The rebuilt APK files will NOT be placed in prebuilt. They will be placed in the bin subdirectory for each app. Reinstalling the APKs from the prebuilt tree will simply reinstall the APKs shipped with the SDK, not the newly-built copies.

Notes to keep in mind when building the samples/demos: 

 


NVIDIA® GameWorks™ Documentation Rev. 1.0.220830 ©2014-2022. NVIDIA Corporation and affiliates. All Rights Reserved.