I am trying to get the sample app of antidote running (source code).
I am confused as to how I need to run my app in Android Studio. I put the C-source files in the /jni
folder, installed Cygwin and run the command ../android/android-ndk-r10d/ndk-build NDK_PROJECT_PATH=app/src/main/
from in the /myworkspace/myApp
-folder.
I don't seem to be getting any errors, and a /libs
folder has been created with in it a library, as depicted in the image below.
However, when clicking the green run-button, Android Studio still gives errors in :app:compileDebugNdk
. Since the code is compiled, does the ndk still need to be run? How do I turn this off? And do I still need to somehow install the library ndk-build has made?
This is my build.gradle
for the project:
sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
allprojects {
repositories {
jcenter()
}
}
And this is the build.gradle
for the Module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.signove.health.service"
minSdkVersion 15
targetSdkVersion 21
}
sourceSets.main{
jni.srcDirs = []
jniLibs.srcDir 'src/main/libs'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}