Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BlurView is not working in signed-release apk #15

Closed
madiguzel opened this issue Aug 6, 2017 · 4 comments
Closed

BlurView is not working in signed-release apk #15

madiguzel opened this issue Aug 6, 2017 · 4 comments

Comments

@madiguzel
Copy link

Hi,

Thanks for this useful component. It works in debug mode as expected but i cannot get the blurview work in signed release apk. Is there any configuration for release mode? Any proguard rules?

SIGNED RELEASE APK

release

DEBUG APK

debug

Thanks in advance...

@mmin18
Copy link
Owner

mmin18 commented Aug 7, 2017 via email

@madiguzel
Copy link
Author

Hi again,

It doesn't crash but I see lots of error logs in logcat like:

20:40:57.675 11034-11034/? E/RenderScript_jni: Error loading RS jni library: java.lang.UnsatisfiedLinkError: JNI_OnLoad failed on a previous attempt to load "/data/app/com.example.myapp-1/lib/arm64/librsjni.so"
08-08 20:40:57.679 11034-11042/? E/System: Uncaught exception thrown by finalizer
08-08 20:40:57.680 11034-11042/? E/System: android.support.v8.renderscript.RSInvalidStateException: Calling RS with no Context active.
at android.support.v8.renderscript.RenderScript.g(RenderScript.java:1225)
at android.support.v8.renderscript.RenderScript.d(RenderScript.java:320)
at android.support.v8.renderscript.RenderScript.helpDestroy(RenderScript.java:1655)
at android.support.v8.renderscript.RenderScript.finalize(RenderScript.java:1689)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)
at java.lang.Thread.run(Thread.java:761)

@madiguzel
Copy link
Author

Hi again,

I founded the solution. It works perfectly now.

When minifyEnabled is true in gradle file, we need to add the following proguard rule:

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

@kirilamenski
Copy link

After migration to androidx library can also help you:

-keep class androidx.renderscript.** { *; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants