问题
Can I use renderscript in an application that is meant to be for android 2.2 and up? Because I know that it has been used for wallpapers, but only internal. Did that change, because renderscript is public now? I am building an application for the tablet, and i am writing it in renderscript, but i want to be able to release it for mobile phones as well. Porting the renderscript code to open gl es 2.0 or sth would be very very hard work for me.
回答1:
Renderscript is a 3.0+ API only. Renderscript was present in 2.2 but the API (and language and compiler) changed a lot in 3.0.
回答2:
Google has published a compatibility library for Renderscript, which allows you to use it starting from Android 2.2 (API8).
The disadvantage is that it uses the CPU unless the OS version is 4.3 and above.
more information about it is available on the android developers blog, here
来源:https://stackoverflow.com/questions/8564517/renderscript-usage