ProGuard

时间:2016-02-05 09:57:57

标签: android proguard android-proguard renderscript blurry

当我使用ProGuard时,我正在使用Blurry它给了我:

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)

2 个答案:

答案 0 :(得分:26)

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

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

答案 1 :(得分:0)

在任何使用Renderscript的现代应用程序中,都应将以下内容添加到proguard-rules.pro文件中。

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

这将照顾使用Android支持库以及Android X的应用程序。