0

我想使用三星 SPen SDK 开发一个应用程序。三星提供的资源中有一个示例,但是当我尝试在 AVD 上运行它时出现错误。它说内存不足。

我已经检查了http://galaxynotespenchallenge.com/forum_topics/657但没有解决方案。

有没有人和我一样的问题并解决了?

这是我的 AVD 配置:

目标:Android 2.3.3 - API 级别 10,最大 VM 应用程序堆大小:256,设备内存大小:512

这是错误:

09-03 11:10:28.712: E/AndroidRuntime(335): FATAL EXCEPTION: main
09-03 11:10:28.712: E/AndroidRuntime(335): java.lang.OutOfMemoryError: bitmap size exceeds VM budget
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:470)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.cl.a(SourceFile:56)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.ao.h(SourceFile:198)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.ao.g(SourceFile:172)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.ao.c(SourceFile:105)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.ao.a(SourceFile:93)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.AbstractSettingView.j(SourceFile:2806)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.AbstractSettingView.a(SourceFile:561)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.AbstractSettingView.<init>(SourceFile:429)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.SettingView.<init>(SourceFile:137)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.spen.a.d.b.onCreateSettingView(SourceFile:591)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.spen.a.g.b.a(SourceFile:74)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.spensdk.SCanvasView.b(SourceFile:382)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.spensdk.SCanvasView.c(SourceFile:362)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.spensdk.SCanvasView.a(SourceFile:359)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.spensdk.SCanvasView$12.onFinish(SourceFile:4543)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.samsung.sdraw.CanvasView.onLayout(SourceFile:597)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.View.layout(View.java:7175)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.RelativeLayout.onLayout(RelativeLayout.java:912)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.View.layout(View.java:7175)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.LinearLayout.onLayout(LinearLayout.java:1047)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.View.layout(View.java:7175)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.View.layout(View.java:7175)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.LinearLayout.onLayout(LinearLayout.java:1047)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.View.layout(View.java:7175)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.View.layout(View.java:7175)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.ViewRoot.performTraversals(ViewRoot.java:1140)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1859)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.os.Handler.dispatchMessage(Handler.java:99)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.os.Looper.loop(Looper.java:123)
09-03 11:10:28.712: E/AndroidRuntime(335):  at android.app.ActivityThread.main(ActivityThread.java:3683)
09-03 11:10:28.712: E/AndroidRuntime(335):  at java.lang.reflect.Method.invokeNative(Native Method)
09-03 11:10:28.712: E/AndroidRuntime(335):  at java.lang.reflect.Method.invoke(Method.java:507)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-03 11:10:28.712: E/AndroidRuntime(335):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-03 11:10:28.712: E/AndroidRuntime(335):  at dalvik.system.NativeStart.main(Native Method)

提前致谢

4

2 回答 2

0

请检查 AVD 的其他属性。您需要的选项是“最大 VM 应用程序大小”。将其设置为 100Mb 并检查问题是否得到解决。

祝你好运

于 2012-09-03T07:26:11.313 回答
0

您是否仔细阅读了您发布的链接的最后一条评论。

我们正在解决模拟器的问题。在此期间,SDK 1.5 仍然可用。版本 1.5 确实适用于模拟器。总体而言,它将很好地了解使用 SDK 的感觉。您可以在 http://innovator.samsungmobile.com/cms/cnts/knowledge.detail.view.do?platformId=1&cntsId=10210找到它

霍德

似乎只有 1.5 版在工作,他们正在努力解决这个问题,据我了解。

于 2012-09-03T03:53:43.880 回答