Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

hello-tango-jni-example - wrong ndk-build command on windows #49

Open
fpilote opened this issue Sep 10, 2015 · 0 comments
Open

hello-tango-jni-example - wrong ndk-build command on windows #49

fpilote opened this issue Sep 10, 2015 · 0 comments

Comments

@fpilote
Copy link

fpilote commented Sep 10, 2015

Hi guys,
i just started to build the first example app using the c api for project tango.

everything went smooth except the ndk-build part.

ndkbuild task in fails on my windows machine.

I had to modify the build.gradle script, in the app folder, so that instead of using "ndk-build" command, it uses "ndk-build.cmd"

here's how i did it, modify app/build.gradle
//top of file.
import org.apache.tools.ant.taskdefs.condition.Os

//modified this function
task ndkBuild(type: Exec) {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
def ndkbuild = properties.getProperty('ndk.dir', null)+"/ndk-build"
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
ndkbuild = ndkbuild + ".cmd"
}
commandLine ndkbuild, '-C', file('src/main/jni').absolutePath
}

Hope this helps!

FYI :
Windows 7 64
Android Studio 1.3.2
Android NDK r10e

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant