简体   繁体   中英

Using renderscript with com.android.library - Scripts are not correctly generated

We have an Android app that uses some renderscript code. We are moving it to a library that we have. I copied all classes that call scripts and also copied the scripts to the src/main/rs folder. The project has the following structure: - a com.android.application module - a com.android.library module (where the render scripts are located)

The library calls the renderscripts from java code correctly (same as the other pure Android application project did) but they are not found.

When I try to look for them (ctrl+N), they were generated but are located inside a different folder build/generated/source/rs/release/com/package/name . In the android application we have, they are generated to the debug folder, and I think this should be the case here to work correctly too (debug mode run).

What should I do to make it work? Thanks.

I don't think that RenderScript is supported as part of a library in Android Studio. It has to be part of the main application package instead (at least based on my experience).

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