Sorry for my english...
I have last android studio (14 june 2013). Create new Android project. Add .so files to /libs/armeabi
Edit build.gradle to
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar','libs/jcPKCS11.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 14
targetSdkVersion 16
}
}
task copyNativeLibs(type: Copy) {
from(new File(project(':JaCertTest').getProjectDir(), 'libs/armeabi')) { include '**/*.so' }
into new File(buildDir, 'native-libs')
}
tasks.withType(Compile) { compileTask -> compileTask.dependsOn copyNativeLibs }
clean.dependsOn 'cleanCopyNativeLibs'
tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask ->
pkgTask.jniDir new File('build/native-libs')
}
I received an error: FAILURE: Build failed with an exception.
- What went wrong:
A problem was found with the configuration of task ':JaCertTest:packageDebug'.
Directory 'build\native-libs' specified for property 'jniDir' does not exist.