gpt4 book ai didi

android - RSRuntimeException : Loading of ScriptC script failed (build tools 19. 0.2)

转载 作者:行者123 更新时间:2023-11-30 03:04:26 25 4
gpt4 key购买 nike

这是我的全部输出:

02-26 09:55:50.410      625-640/com.vsco.cam E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:299)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
at java.util.concurrent.FutureTask.run(FutureTask.java:239)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Caused by: android.renderscript.RSRuntimeException: Loading of ScriptC script failed.
at android.renderscript.ScriptC.<init>(ScriptC.java:61)
at android.support.v8.renderscript.ScriptCThunker.<init>(ScriptCThunker.java:39)
at android.support.v8.renderscript.ScriptC.<init>(ScriptC.java:62)
at com.vsco.cam.utility.ScriptC_processing.<init>(ScriptC_processing.java:41)
at com.vsco.cam.effects.EffectProcessor.initialize(EffectProcessor.java:67)
at com.vsco.cam.LoadingAsyncTask.doInBackground(LoadingAsyncTask.java:24)
at com.vsco.cam.LoadingAsyncTask.doInBackground(LoadingAsyncTask.java:16)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
            at java.lang.Thread.run(Thread.java:841)

这是我的 build.gradle 文件的一部分:

defaultConfig {
minSdkVersion 14
targetSdkVersion 19
renderscriptTargetApi 19
renderscriptSupportMode=true
}

在将我的构建工具更新到 19.0.2 之前,我收到了每个错误的 rs,该错误已使用最新的构建工具版本 (https://code.google.com/p/android/issues/detail?id=64110) 修复。现在我完全不知道为什么这不能在非 4.4 手机(需要向后兼容的手机,又名支持库)上运行。这是否与每个 rs 的问题相同,还是我只是遗漏了什么?

似乎就在这里失败了,在 ScriptC.java 文件中:

protected ScriptC(RenderScript rs, Resources resources, int resourceID) {
super(0, rs);
int id = internalCreate(rs, resources, resourceID);
if (id == 0) {
throw new RSRuntimeException("Loading of ScriptC script failed.");
}
setID(id);
}

ScriptC_processing:41:

 public  ScriptC_processing(RenderScript rs, Resources resources, int id) {
super(rs, resources, id);
__ALLOCATION = Element.ALLOCATION(rs);
__SCRIPT = Element.SCRIPT(rs);
__U32_2 = Element.U32_2(rs);
__SAMPLER = Element.SAMPLER(rs);
__F32_2 = Element.F32_2(rs);
__I32 = Element.I32(rs);
__F32 = Element.F32(rs);
__U8_4 = Element.U8_4(rs);
}

编辑:看起来 id 是在这里设置的:

protected ScriptC(RenderScript rs, Resources resources, int resourceID) {
super(0, rs);

if (rs.isNative) {
RenderScriptThunker rst = (RenderScriptThunker)rs;
ScriptCThunker s = new ScriptCThunker(rst, resources, resourceID);
mT = s;
return;
}

int id = internalCreate(rs, resources, resourceID);
if (id == 0) {
throw new RSRuntimeException("Loading of ScriptC script failed.");
}
setID(id);
}

最佳答案

感谢 Stephen Hines 的评论,这是由于我的目标 api 设置为 19 而导致的。

关于android - RSRuntimeException : Loading of ScriptC script failed (build tools 19. 0.2),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22049712/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com