-5
02-15 09:10:02.196: E/dalvikvm-heap(881): Out of memory on a 2162176-byte allocation.
02-15 09:10:02.376: E/AndroidRuntime(881): FATAL EXCEPTION: main
02-15 09:10:02.376: E/AndroidRuntime(881): java.lang.OutOfMemoryError
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:355)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:378)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.plugai.android.livewallpapers.fishes.ClownFish.<init>(ClownFish.java:20)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.plugai.android.livewallpapers.Aquarium.addFishes(Aquarium.java:88)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.plugai.android.livewallpapers.Aquarium.initialize(Aquarium.java:81)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.plugai.android.livewallpapers.AquariumWallpaperService$AquariumWallpaperEngine.<init>(AquariumWallpaperService.java:20)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.plugai.android.livewallpapers.AquariumWallpaperService.onCreateEngine(AquariumWallpaperService.java:10)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:1034)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:40)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.os.Handler.dispatchMessage(Handler.java:99)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.os.Looper.loop(Looper.java:137)
02-15 09:10:02.376: E/AndroidRuntime(881):  at android.app.ActivityThread.main(ActivityThread.java:5039)
02-15 09:10:02.376: E/AndroidRuntime(881):  at java.lang.reflect.Method.invokeNative(Native Method)
02-15 09:10:02.376: E/AndroidRuntime(881):  at java.lang.reflect.Method.invoke(Method.java:511)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-15 09:10:02.376: E/AndroidRuntime(881):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-15 09:10:02.376: E/AndroidRuntime(881):  at dalvik.system.NativeStart.main(Native Method)
4

2 回答 2

3

显然,动态壁纸需要的内存(RAM)比您拥有的更多。

于 2013-02-15T09:27:16.393 回答
2

您收到 OutOfMemory 异常。这意味着您的应用程序尝试在设备 RAM 中分配过多的内存。这通常是由于尝试加载大于所需的图像而引起的。

尝试缩小您在动态壁纸中使用的任何图形。

于 2013-02-15T09:28:06.213 回答