我应该使用哪个版本的 RenderScript?

Which version of RenderScript should I be using?

这是我在 AndroidStudio 中的 gradle 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    defaultConfig {
        applicationId "com.apps.foo.bar"
        minSdkVersion 15
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        //renderscriptTargetApi 21
        //renderscriptSupportModeEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.0'
}

现在如果你检查这个 link

它说:

We recommend you set this value to the highest available API level and set renderscriptSupportModeEnabled to true.

最高API 级别是多少?是22吗? 18? 19?我在哪里可以找到?我知道 19 个有效,因为我在另一个应用程序中尝试过,我只是想知道我可以使用哪个是最新的。

您不应该随意设置最高 API 级别。文档是错误的,我只是提交了一个错误以在内部进行清理。您应该将其设置为您的应用所针对的 API 级别。如果您需要提高它以获得额外的 RenderScript 功能,它会在文档中注明(即此 API 仅出现在 v19 -> 设置为 19 中)。如果您认为除了基本支持库和运行时之外您不需要太多,请尝试使用 18 一般。