RenderScript不在android studio上构建ScriptC文件

时间:2015-12-14 03:38:06

标签: android renderscript

我正在尝试将以下链接中使用渲染脚本的答案集成到我的项目中。但是rotator.rs不会生成ScriptC_rotator文件。我该如何整合这个?

Android: rotate image without loading it to memory

My Gradle(我可以导入android.support.v8.renderscript.RenderScript和 android.support.v8.renderscript.Allocation罚款)

 compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId "com.XXXX"
        minSdkVersion 12
        targetSdkVersion 23
        renderscriptTargetApi 22
        renderscriptSupportModeEnabled true
        renderscriptNdkModeEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-v4:+'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
}

1 个答案:

答案 0 :(得分:1)

renderscriptNdkModeEnabled应为false。如果将它设置为true,则会获得ScriptC_rotator.cpp。