连接: How to use the Renderscript Support Library with Gradle

Android-Studio and Renderscript support with Build-tools 21.1.0.

这个版本之后更改properties name,所以只要将其改成:(在build.gradle中加入下面两句话即可直接使用RenderScript相关API)

 android {
compileSdkVersion 21
buildToolsVersion '21.1.2' defaultConfig {
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
}
}

RenderScript支持库让Android 2.2以后的设备都能使用RenderScript功能。

最新的RenderScript支持库是随着最新的SDK工具包一起发布的,它能让开发者在不同版本的平台上充分发挥RenderScript的功能,目前可以最早支持到Android 2.2(Froyo).

使用RenderScirpt支持库,那么下面几件事情你应该知道:

首先,RenderScript支持库支持几乎所有的原生RenderScript API功能。但是有几个例外:Allocation.USAGE_IO_INPUT 和Allocation.USAGE_IO_OUTPUT。这两个API目前还没有包含到RenderScript支持库里。

其次,Android 4.2和更早的设备会强制RenderScript应用在CPU上运行,不过4.3和以后的版本会让他们的RenderScript应用在任意空闲的处理器上运行。因为支持库脚本版本的脚本必须通过预编译才能支持跨平台特性,所以预编译脚本在性能相较于Android 4.3版本的RenderScript运行时编译方式会略有损耗,因为预编译脚本在编译优化方面有一定的限制。

连接:Android支持库——RenderScript

Gradle dsl method not found renderscriptSupportMode()的更多相关文章

  1. [原创] Gradle DSL method not found: 'android()' 和 buildToolsVersion is not specified 的解决办法。

    今天在用Android Studio 2.0 打开别人的较早版本生成的工程时, 提示: Gradle DSL method not found: 'android()'. 解决办法为,打开根目录下面的 ...

  2. android studio ,Gradle DSL method not found: 'compile()'

    用gradle构建android工程出现  Gradle DSL method not found: 'compile()' 错误 检查你外层的build.gradle文件中是不是用了compile方 ...

  3. After Android Studio update: Gradle DSL method not found: 'runProguard()'

    1 具体报错为: Error:(16, 0) Gradle DSL method not found: 'runProguard()' Possible causes:<ul><li ...

  4. Gradle DSL method found: ‘android()’错误

    Gradle DSL method found: ‘android()’错误 和上个错误一样这个也是因为在新版本的Gradle中android()方法已经废弃,但是要注意android()只是在整个项 ...

  5. Gradle DSL method not found: 'android()

    原文错误提示: Error:(16, 0) Gradle DSL method not found: 'android()'Possible causes:<ul><li>Th ...

  6. 【转】解决Gradle DSL method not found: ‘android()’

    [转]解决Gradle DSL method not found: ‘android()’ 最近导入as的项目出了这样的问题 这个问题困扰了我很长时间,好吧,搜了半天全都是runProguard的,最 ...

  7. Android Studio:Gradle DSL method not found: 'runProguard()'

    Android Studio发布了新的1.0版,更新之后却发现原来在0.8下面正常的项目编译失败了,从报错上来看是卡在gradle上面. Gradle DSL method not found: 'r ...

  8. Android Studio 导入别人项目时候遇见的问题“Gradle DSL method not found: 'compile()'”

    Gradle DSL method not found: 'compile() 遇见这个问题截图: 解决: 在项目的根目录的build.gradle文件中是不是用了compile方法 如果有的话,剪切 ...

  9. Android Studio 新手常见错误:Gradle DSL method not found: &#39;runProguard()&#39;

    在Android Studio上执行Github上的某Android开源项目,提示报错: Error:(20, 0) Gradle DSL method not found: 'runProguard ...

随机推荐

  1. virgo虚拟桌面

    转载: http://www.appinn.com/virgo-virtual-desktop-for-windows/ virgo 是一款 Windows 下的极简虚拟桌面,源程序自身只有 7KB, ...

  2. 台大《机器学习基石》课程感受和总结---Part 1(转)

    期末终于过去了,看看别人的总结:http://blog.sina.com.cn/s/blog_641289eb0101dynu.html 接触机器学习也有几年了,不过仍然只是个菜鸟,当初接触的时候英文 ...

  3. HLG2040二叉树遍历已知前中,求后

    二叉树的遍历 Time Limit: 1000 MS Memory Limit: 32768 K Total Submit: 60(34 users) Total Accepted: 34(30 us ...

  4. python __init__ __call__

    __call__ 和 __init__半毛钱的关系都没有. 后者是构造类的实例时会调用的方法,并不是构造方法. 前者是在实例上可以呼叫的方法.代码示例如下: >>> class fo ...

  5. Install ssdb-rocks on CentOS 6

    Install ssdb-rocks on CentOS 6 C.C.  发表于 2014年08月10日 20:14 | Hits: 649 为了优化节操精选的弹幕系统,打算更换到Facebook的R ...

  6. 【Python】 Django 怎么实现 联合主键?

    unique_together¶ Options.unique_together¶ Sets of field names that, taken together, must be unique: ...

  7. JAVA接口继承、抽象类等

    1.定义接口 package test.intefaces; public interface TestIntefaceA { void testA(); void testB(); void tes ...

  8. codeforces 471B. MUH and Important Things 解题报告

    题目链接:http://codeforces.com/problemset/problem/471/B 题目意思:有 n 个 tasks,编号依次为 1 - n,每个 task 都有一定的难度值来评估 ...

  9. java代码获取jdbc链接properties

    public static String getDirPath() { Resource resource = null; Properties props = null; String driver ...

  10. HTML5-------元素使用

    HTML5的元素使用