I am building Renderscript processing, and for life I cannot get it to work with gingerbread cookies through Gradle.
Processing uses both Intrinsics and user cores.
with renderscriptTargetApi 18and renderscriptSupportMode truewith the latest build tools buildToolsVersion "19.0.1"and classpath 'com.android.tools.build:gradle:0.8.+'and gradle 1.10 it compiles fine and it works fine on ICS + devices, but it crashes on Gingerbread with the following stack trace:
Caused by: android.support.v8.renderscript.RSRuntimeException: Error loading RS jni library: java.lang.UnsatisfiedLinkError: Couldn't load RSSupport: findLibrary returned null
at android.support.v8.renderscript.RenderScript.create(RenderScript.java:945)
at android.support.v8.renderscript.RenderScript.create(RenderScript.java:982)
at android.support.v8.renderscript.RenderScript.create(RenderScript.java:968)
I also tried in various versions:
buildToolsVersion: 18.1.1, 18.1
classpath: 0.7 + 0.7.1
Some of these required gradle 1.9 to run, which I changed and started and worked.
I also tried to include the following lines in build.gradle
dependencies {
compile files('libs/renderscript-v8.jar')
}
android {
tasks.withType(com.android.build.gradle.tasks.PackageApplication) {
pkgTask -> pkgTask.jniFolders = new HashSet<File>();
pkgTask.jniFolders.add(new File(projectDir, 'libs'));
}
}
Renderscript Gradle ( , ) - renderscript v8 (multiple dex files define android/support/v8/renderscript/Allocations)
, build.gradle:
apply plugin: 'android'
android {
compileSdkVersion 18
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
versionCode 1
versionName "1.0"
renderscriptTargetApi 18
renderscriptSupportMode true
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
}
build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.8.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
, :
ICS + Gingerbread?