title: Android - Renderscript Support Library - Error loading RS jni library
body: <p>I am trying to include the Renderscript support library into my project. I am getting the following error.</p>
  
  <pre><code>android.support.v8.renderscript.RSRuntimeException: Error loading RS jni library: java.lang.UnsatisfiedLinkError: Couldn't load rsjni: findLibrary returned null
  </code></pre>
  
  <p>I am not using any Renderscript jar files, I am attempting to use it via Gradle.</p>
  
  <p>Here are my Gradle.build files</p>
  
  <p>TOP LEVEL</p>
  
  <pre><code>buildscript {
  repositories {
      jcenter()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:1.2.3'
  }
  }
  
  ext {
  compileSdkVersion="Google Inc.:Google APIs:22"
  buildToolsVersion="23.0.1"
  playStoreMinSdkVersion=16
  amazonStoreMinSdkVersion=8
  targetSdkVersion=22
  versionCode=20
  versionName="3.3.0"
  runProguard=true
  zipAlign=true
  proguardConfiguration='../proguard.config'
  }
  
  allprojects {
  repositories {
      jcenter()
  }
  }
  </code></pre>
  
  <p>Application Specific</p>
  
  <pre><code>defaultConfig {
      applicationId "**REMOVED**"
      //noinspection GroovyAssignabilityCheck
      targetSdkVersion rootProject.ext.targetSdkVersion
      //noinspection GroovyAssignabilityCheck
      versionCode rootProject.ext.versionCode
      //noinspection GroovyAssignabilityCheck
      versionName rootProject.ext.versionName
  
      renderscriptTargetApi 23
      renderscriptSupportModeEnabled true
  }
  </code></pre>
  
  <p>Everything I try &amp; find as possible solutions on stackoverflow are not working. I also have this included in my proguard config</p>
  
  <pre><code>#RenderScript
  -keepclasseswithmembernames class * {
  native &lt;methods&gt;;
  }
  -keep class android.support.v8.renderscript.** { *; }
  </code></pre>
  
  <p>Edit: Here is the implementation where I actually use renderscript, also this is where it causes my app the crash when called.</p>
  
  <pre><code>public static BitmapDrawable Blur ( View view ){
  
      Bitmap image = GetScreenshot( view );
  
      int width = Math.round( image.getWidth() * DEFAULT_BITMAP_SCALE );
      int height = Math.round( image.getHeight() * DEFAULT_BITMAP_SCALE );
  
      Bitmap inputBitmap = Bitmap.createScaledBitmap( image, width, height, false );
  
      Bitmap outputBitmap = Bitmap.createBitmap( inputBitmap );
  
      RenderScript rs = RenderScript.create( view.getContext() );
      ScriptIntrinsicBlur intrinsicBlur = ScriptIntrinsicBlur.create( rs, Element.U8_4(rs) );
  
      Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap);
      Allocation tmpOut = Allocation.createFromBitmap( rs, outputBitmap );
  
      intrinsicBlur.setRadius( DEFAULT_BLUR_RADIUS );
      intrinsicBlur.setInput( tmpIn );
      intrinsicBlur.forEach( tmpOut );
  
      tmpOut.copyTo( outputBitmap );
  
      inputBitmap.recycle();
      rs.destroy();
  
      return new BitmapDrawable( outputBitmap );
  }
  </code></pre>
  
  <p>This is the exact line</p>
  
  <pre><code>RenderScript rs = RenderScript.create( view.getContext() );
  </code></pre>