Can't Repro
Status Update
Comments
ha...@gmail.com <ha...@gmail.com> #2
Thanks in advance
bl...@gmail.com <bl...@gmail.com> #3
Did you figure out why this is happening?
Thanks!
Thanks!
mi...@google.com <mi...@google.com>
pe...@gmail.com <pe...@gmail.com> #5
Hello,
it may or may not be relevant, but based on this SO answerhttps://stackoverflow.com/a/54224531 it seems like this is by design - librs.xx.so will be compiled on-the-go on the target device, so initial attempt to retrieve it will fail and it is expected.
Looking forward to your answers to this.
Thank you in advance!
it may or may not be relevant, but based on this SO answer
Looking forward to your answers to this.
Thank you in advance!
uc...@google.com <uc...@google.com> #6
Thanks for the feedback. Could you try to reproduce your issue in the latest version of Android Studio, and let us know if this still reproduces?
an...@google.com <an...@google.com> #7
Our team had requested additional information for this issue which was not provided within 30 days. Unfortunately there is not enough information for us to proceed and this issue is now closed.
In the future, if you encounter this or any other issue, please readhttps://developer.android.com/studio/report-bugs.html and file a new bug report with all the required information. This will help ensure the team can correctly triage, reproduce, and resolve your issue.
Thank you!
In the future, if you encounter this or any other issue, please read
Thank you!
ra...@gmail.com <ra...@gmail.com> #8
The report included git repository to reproduce the issue. Did you try that before closing the issue?
Description
There is no issue with the compilation, but at runtime, logcat shows error like this
05-31 19:40:23.097 8661-8734/com.example.audio.test E/RenderScript: Unable to open shared library (/data/user/0/com.example.audio.test//lib/
If I have renderscriptTargetApi as 19 or 20, my apk has
I'm using renderscript through NDK i.e. C++. Also using CMake. There aren't instructions I could find to make use of renderscript support library through NDK. All instructions assume that the support library is used through Java.
This is from build.gradle
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
renderscriptTargetApi 24
renderscriptSupportModeEnabled true
renderscriptNdkModeEnabled true
CMakeLists.txt has
add_library (dsp SHARED
${SRC_PATH}/dsp.cpp
${SRC_RS_PATH}/
target_compile_options(dsp PRIVATE
-std=c++11 -stdlib=libc++ -fno-rtti -fexceptions -Ofast)
target_link_libraries(dsp RScpp_static dl ${log-lib})
This is
#pragma version(1)
#pragma rs java_package_name(com.example.audio)
#pragma rs_fp_relaxed
float RS_KERNEL my_kernel(float in, uint32_t x) {
// ...
}
This is how the kernel is called from C++
sp<RS> rs = new RS();
rs->init(app_cache_dir);
sp<const Element> e = Element::F32(rs);
sp<const Type> t = Type::create(rs, e, 44100*10, 0, 0);
sp<Allocation> inAlloc = Allocation::createTyped(rs, t);
inAlloc->copy1DFrom(input);
sp<Allocation> outAlloc = Allocation::createTyped(rs, t);
ScriptC_xx *script = new ScriptC_xx(rs);
script->forEach_xx(inAlloc, outAlloc);
outAlloc->copy1DTo(output);
As you see, it is pretty basic usage scenario of renderscript. It works well with renderscriptTargetApi in 19 or 20. If I bump up the version, build is still successful, but
What am I missing here? I tried manipulating my minSdkVersion which I think is unrelated to renderscript target api. It didn't help.
How can I use the newer renderscript APIs in the backward compatible manner from NDK? Any help is appreciated.
Repo to reproduce the issue