Android Multiple Targets Error?

I am trying to build for multiple targets for native and i am getting the error:

Cannot use toolchain from C:\NVPACK\android-ndk-r10e: name

I’ve tried using combinations that the comment for the field suggests (ARM, AArch64, x86, x64) all of them get the same error.

Hi gyroheli,
What Toolchain Version do you set in Project Properites>Conifguration Properties>Toolchain Version?
And could you check if the toolchain you use is existed in your C:\NVPACK\android-ndk-r10e\toolchains?

Victor

I have the same error, tried GCC 4.9 and Default toolchains.

But I just notice that when press Apply, toolchan property is hidden:

Ok, fixed. So, there are must be all required configurations created for all projects. In my case: ARM-Android-NVIDIA and x86-Android-NVIDIA. On top level of projects they should create .SO, not APK. Then I created clean (it’s important) Tegra-Android configuration for the main project only, set Target Architecture to Multiple, Platforms to Package: ARM;x86. It will create our APK.
Special thanks to NVidia’s for the great tool again! =)

That’s as designed because for such configuration build system actually utilizes multiple toolchains, or at least their platform files.

In sum, you should set Target Architecture to Multiple only on packaging project in Tegra-Android Platform configuration.
Here’s a little recap:
For a library project that produces the actual dynamic libraries you need to go to the Platforms combo in VS IDE Configuration manager and add all of the platforms you are interested in building. Make those build first. When you build like that they would each get their own APK.
Now, go back to the packaging project settings for Tegra-android platform.
switch target Architecture to Multiple and specify the short names for the other platforms you want to pack in the resulting APK.
Tegra-Android build will trigger the build for these platforms and wait until it’s finished.
That’s how it works, since you needed a way to setup the platforms independently for proper per platform compiler flags, etc.

Yep, understood.
Btw, there are trouble to add additional 3rd-party libs for several archs.
I did a little hack for a while:

String targetBassX86 = android.sourceSets.main.jniLibs.srcDirs[0].toString() + "\\x86"
String targetBassArm = android.sourceSets.main.jniLibs.srcDirs[0].toString() + "\\armeabi-v7a"

copy
{
 from "$System.env.LIBS/bass24-android/libs/x86/libbass.so"
 into targetBassX86
}

copy
{
 from "$System.env.LIBS/bass24-android/libs/armeabi-v7a/libbass.so"
 into targetBassArm
}