简体   繁体   中英

android.support.v8.renderscript error on ProGuard

I am using Blurry when I do ProGuard it gives me:

Error loading RS jni library: java.lang.UnsatisfiedLinkError: 

android.support.v8.renderscript.l: Error loading RS jni library: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/com.app.app-2/lib/arm/librsjni.so"
at android.support.v8.renderscript.RenderScript.a(SourceFile:1347)
at android.support.v8.renderscript.RenderScript.b(SourceFile:1504)
at android.support.v8.renderscript.RenderScript.a(SourceFile:2454)
at jp.wasabeef.blurry.internal.Blur.rs(SourceFile:62)
at jp.wasabeef.blurry.internal.BlurTask$1.run(SourceFile:61)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

添加到下面的 proguard-rules.pro 文件行中:

-keep class android.support.v8.renderscript.** { *; }

In any modern app that uses Renderscript, you should add the following to your proguard-rules.pro file.

# Render Script
-keep class android.support.v8.renderscript.** { *; }
-keep class androidx.renderscript.** { *; }

This will take care of apps that use the Android support library, as well as Android X.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM