Renderscript broken with AndroidX?

I had the same issue, i switched to non support version of renderscript

In project gradle

renderscriptTargetApi 17
renderscriptSupportModeEnabled false

And in the class that use renderscript

import android.renderscript.RenderScript

instead of

import androidx.renderscript.RenderScript

It did the job for me but i don't like this solution, to be completed


There was an issue with the build tools (the prebuilt librsjni_androidx.so, to be exact), and is now fixed in version 29.0.2.

I've verified this by upgrading compile sdk to API 29 and build tools to 29.0.2.

Edit: This is what I've configured in build.gradle:

    renderscriptTargetApi 18
    renderscriptSupportModeEnabled true