Renderscript via the support library

拟墨画扇 提交于 2019-11-30 12:14:37

PSA for Googlers: RenderScript is now part of the Android Support Library. You can use it on Android 2.2+.

Its not yet production quality.

My Android tools contain the files:

./build-tools/18.1.0/renderscript/lib/renderscript-v8.jar
./build-tools/18.1.1/renderscript/lib/renderscript-v8.jar

Putting them in the libs/ directory of your project will result in a working build in Eclipse and with ant.

I have eclipse, android sdk tools 22.6.3, android platform tools 19.0.1 and I set both of these projects API 19 android 4.4.2.

I was able to compile and run hellocompute(from the samples of android 19) and wants to change it to android support v8 things.

following steps works for me:

1.set android build target to 4.4.2 api 19.

2.add "rendersrcipt-v8.jar" to libraries in android build path

3.in project.properties set things like

"target=android-19
 renderscript.target=19
 renderscript.support.mode=true
 sdk.buildtools=19.0.3"

4.Comment out the following import lines:

import android.renderscript.RenderScript;
import android.renderscript.Allocation;

and import

import android.support.v8.renderscript.*;

5.clean the project and rebuild.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!