我正在尝试在android / sdk / samples中构建一个RenderScript示例。 我已经尝试了HelloWorld和Balls的例子,但应用程序正在强行关闭
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
我正在尝试在运行3.0.1的Xoom上构建。 任何人都可以确认您是否能够安装RenderScript示例?
谢谢。
答案 0 :(得分:2)
答案 1 :(得分:1)
无论如何,我已经成功运行了Eclipse中的所有示例,但没有使用模拟器。模拟器(至少在我的机器上)非常慢。我买了一台Xoom,很容易让所有的样品在它上面运行。
因此,如果您正在使用Eclipse和实际的Xoom(而不是模拟器),那么我建议从头开始使用全新的Eclipse安装和全新的Android SDK安装。并确保使用“新Android项目”导入示例。向导中的某个选项专门用于导入样本。