Is it possible to move the location of "res"

As Nsight Tegra allows the support of cross-platform solutions I’d like to put the platform specific stuff in a separate directory. That’s why I’d like to move “res” but I cannot figure out how to do it. Is it possible?

Hi Zingam,
You can set asset path via project configuration properties:Ant Build>Additional Dependencies>Asset Directories


Hi Victor,

I set the the path but what happened is during compilation an asset directory was created in the directory of the project. And that was it. I got an error.
The build system is still looking for res in the same old place:

1>  -crunch:
1>     [crunch] Crunching PNG Files in source dir: X:\Android\Vulcano\workspaces\vs2015\Vulcano\res

The gradle (option) doesn’t copy the files as And as described above but both still need res to be in the same directory as the project file.

I basically do it I set:

$(OutDir) and $(IntDir) to point to a directory out of the source directory. I also move the project/solution files out of the source directory. Like that:


It mostly works with a few glitches.

warning : Exception when parsing the Ant log. See the Output window for the build messages.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Tegra-Android\Nvidia.AndroidBuild.targets(253,5): warning : Could not find file 'X:\Android\Vulcano\workspaces\__build-output\vs2015\IntDir\Tegra-Android\Debug\ant_log.xml'.

A .log file named .log ignores the output directory and is placed next to the directory containing the Visual Studio solution file.

And I have to keep the res directory in the same directory as the project file.

Why I want to do that? To keep the source code clean of compilation artifacts. I our VS project we support 5 platforms with Android coming in the near future and I’d like to clean that mess.

Now I see: gradle just copies the contents of :Ant Build>Additional Dependencies>Asset Directories and Ant builds an asset directory in the project directory and then copies them. I’d prefer the gradle way. No need for a double copying.
If I put the res too. Ant just copies them too and doesn’t build the resources in res as it is supposed to.
This sets location of addition assets but not the location of “res” and “assets” themselves as it should be possible to do in the latest gradle.

H.i Zingam,

It seems misunderstanding here. Asset and res are different. res directory is accessible from R.class while assets behave like a file system.

Currently, we assume res is at default path. If you want to keep things separated. There is an easy way to this by use “mklink /D /J <platform_specific_res>”. You can put this command into build hook events on your demand.
There are several places to hook events:
Ant/Gradle Build>Pre-XX Event
Build Events
Custom Build Steps


Thank you! I use robocopy in a build event but a symbolic link might be just better.

Hi Zingam,

If you are still interested, I modified AndroidSDK\tools\ant\build.xml in order to specify different res folders for different build configurations and I can share the solution.