无法构建Android的HelloWorld的在RenderScriptAndroid、HelloWorld、RenderScript

2023-09-04 06:08:08 作者:做你的小妖精

我想建立的是Android / SDK /样品中RenderScript的例子之一。 我试过的HelloWorld和球的例子,但应用是部队结束

I am trying to build one of the RenderScript examples in the android/sdk/samples. I've tried HelloWorld and Balls examples, but the application is force closing



05-11 15:25:44.670: WARN/bcc(14985): Unable to open /data/data/com.android.rs.helloworld/cache/@com.android.rs.helloworld:raw@helloworld.oBCC in read mode.  (reason: No such file or directory)
05-11 15:25:44.670: ERROR/bcc(14985): Unable to readBC, bitcode=0x17d3f8, size=1068
05-11 15:25:44.670: DEBUG/StopWatch(14985): StopWatch bcc: PrepareExecutable time (us): 1551 
05-11 15:25:44.670: ERROR/RenderScript(14985): bcc: FAILS to prepare executable
05-11 15:25:44.670: DEBUG/RenderScript(14985): >>>> ~ScriptC  bccDisposeScript(0x17d8f0)
05-11 15:25:44.670: ERROR/RenderScript(14985): rsAssert failed: !mUserRefCount, in frameworks/base/libs/rs/rsObjectBase.cpp at 63
05-11 15:25:44.670: DEBUG/AndroidRuntime(14985): Shutting down VM
05-11 15:25:44.670: WARN/dalvikvm(14985): threadid=1: thread exiting with uncaught exception (group=0x4017e760)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985): FATAL EXCEPTION: main
05-11 15:25:44.680: ERROR/AndroidRuntime(14985): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.rs.helloworld/com.android.rs.helloworld.HelloWorld}: android.renderscript.RSRuntimeException: Loading of ScriptC script failed.
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1736)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1752)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.ActivityThread.access$1500(ActivityThread.java:123)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:993)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.os.Looper.loop(Looper.java:126)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.ActivityThread.main(ActivityThread.java:3997)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at java.lang.reflect.Method.invokeNative(Native Method)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at java.lang.reflect.Method.invoke(Method.java:491)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at dalvik.system.NativeStart.main(Native Method)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985): Caused by: android.renderscript.RSRuntimeException: Loading of ScriptC script failed.
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.renderscript.ScriptC.(ScriptC.java:60)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.rs.helloworld.ScriptC_helloworld.(ScriptC_helloworld.java:32)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.rs.helloworld.HelloWorldRS.initRS(HelloWorldRS.java:46)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.rs.helloworld.HelloWorldRS.init(HelloWorldRS.java:37)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.rs.helloworld.HelloWorldView.ensureRenderScript(HelloWorldView.java:44)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.rs.helloworld.HelloWorldView.(HelloWorldView.java:33)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at com.android.rs.helloworld.HelloWorld.onCreate(HelloWorld.java:33)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1700)
05-11 15:25:44.680: ERROR/AndroidRuntime(14985):     ... 11 more
05-11 15:25:44.680: WARN/ActivityManager(130):   Force finishing activity com.android.rs.helloworld/.HelloWorld

我试图建立在Xoom的运行3.0.1。 任何人都可以,请确认是否能够安装RenderScript例子吗?

I am attempting to build on the Xoom running 3.0.1. Can anyone please confirm if you are able to install a RenderScript example?

感谢你。

推荐答案

有一个公认的问题与prevented任何样品的运行编译器。这是写给这里。

There was an acknowledged problem with the compiler that prevented any of the samples from running. It was addressed here.

由Android团队所提供的解决办法是把它使用编译器3.0从previous释放更换平台-tools目录中。

The workaround provided by the android team is to replace your platform-tools directory with the one from a previous release which uses the compiler from 3.0.

此修复程序为我工作。