编译RenderScript时出现问题

时间:2015-09-24 03:53:28

标签: android android-fragments android-activity android-view

我已经按照本教程进行了操作:

https://futurestud.io/blog/how-to-blur-images-efficiently-with-androids-renderscript/

但是,无论在哪里提到<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script> <div id="loading" style="display:none">Loading</div>变量,我都会收到以下错误:

rs

这是我的Wrong 1st argument type. Found: 'android.support.v8.renderscript.RenderScript', required: 'android.renderscript.RenderScript'

android {     compileSdkVersion 23     buildToolsVersion&#34; 23.0.1&#34;

build.gradle

}

我做错了什么?

2 个答案:

答案 0 :(得分:0)

如果您要导入:

import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;

仅通过以下方式替换这些行:

android.support.v8.renderscript.*
祝你好运! (:

答案 1 :(得分:0)

是的,你正在混合和匹配“android.renderscript”和“android.support.v8.renderscript”,如#user5195185所述。

另外,请尝试使用Build-Tools 23.0.3,其中包含对支持库的几个修复:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.test.app"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"

        renderscriptTargetApi 19
        renderscriptSupportModeEnabled true
    }
}
相关问题