我正在创建我的第一个Android应用程序,由于某种原因,我在日志中说“没有内存加载当前壁纸”时出现Out Of Memory Error。有趣的是,我的应用程序甚至没有任何壁纸加载。我找不到有关此问题的任何信息。您是否在Android应用中遇到过这种情况?你有什么想法来解决它?
这是堆栈:
05-01 13:33:32.796: I/dalvikvm(65): "android.server.ServerThread" prio=5 tid=9 RUNNABLE
05-01 13:33:32.796: I/dalvikvm(65): | group="main" sCount=0 dsCount=0 obj=0x4062f658 self=0x1452f0
05-01 13:33:32.806: I/dalvikvm(65): | sysTid=78 nice=-2 sched=0/0 cgrp=default handle=1332240
05-01 13:33:32.806: I/dalvikvm(65): | schedstat=( 192509168074 60642217424 29772 ) utm=16633 stm=2617 core=0
05-01 13:33:32.806: I/dalvikvm(65): at android.graphics.BitmapFactory.nativeDecodeFileDescriptor(Native Method)
05-01 13:33:32.806: I/dalvikvm(65): at android.graphics.BitmapFactory.decodeFileDescriptor(BitmapFactory.java:568)
05-01 13:33:32.806: I/dalvikvm(65): at android.app.WallpaperManager$Globals.getCurrentWallpaperLocked(WallpaperManager.java:274)
05-01 13:33:32.806: I/dalvikvm(65): at android.app.WallpaperManager$Globals.peekWallpaperBitmap(WallpaperManager.java:229)
05-01 13:33:32.806: I/dalvikvm(65): at android.app.WallpaperManager.getFastDrawable(WallpaperManager.java:420)
05-01 13:33:32.806: I/dalvikvm(65): at com.android.internal.service.wallpaper.ImageWallpaper$DrawableEngine.updateWallpaperLocked(ImageWallpaper.java:272)
05-01 13:33:32.806: I/dalvikvm(65): at com.android.internal.service.wallpaper.ImageWallpaper$DrawableEngine$WallpaperObserver.onReceive(ImageWallpaper.java:96)
05-01 13:33:32.806: I/dalvikvm(65): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:716)
05-01 13:33:32.806: I/dalvikvm(65): at android.os.Handler.handleCallback(Handler.java:587)
05-01 13:33:32.806: I/dalvikvm(65): at android.os.Handler.dispatchMessage(Handler.java:92)
05-01 13:33:32.806: I/dalvikvm(65): at android.os.Looper.loop(Looper.java:126)
05-01 13:33:32.806: I/dalvikvm(65): at com.android.server.ServerThread.run(SystemServer.java:576)
05-01 13:33:32.806: D/skia(65): --- decoder->decode returned false
05-01 13:33:32.817: W/WallpaperManager(65): No memory load current wallpaper
05-01 13:33:32.817: W/WallpaperManager(65): java.lang.OutOfMemoryError
05-01 13:33:32.817: W/WallpaperManager(65): at android.graphics.BitmapFactory.nativeDecodeFileDescriptor(Native Method)
05-01 13:33:32.817: W/WallpaperManager(65): at android.graphics.BitmapFactory.decodeFileDescriptor(BitmapFactory.java:568)
05-01 13:33:32.817: W/WallpaperManager(65): at android.app.WallpaperManager$Globals.getCurrentWallpaperLocked(WallpaperManager.java:274)
05-01 13:33:32.817: W/WallpaperManager(65): at android.app.WallpaperManager$Globals.peekWallpaperBitmap(WallpaperManager.java:229)
05-01 13:33:32.817: W/WallpaperManager(65): at android.app.WallpaperManager.getFastDrawable(WallpaperManager.java:420)
05-01 13:33:32.817: W/WallpaperManager(65): at com.android.internal.service.wallpaper.ImageWallpaper$DrawableEngine.updateWallpaperLocked(ImageWallpaper.java:272)
05-01 13:33:32.817: W/WallpaperManager(65): at com.android.internal.service.wallpaper.ImageWallpaper$DrawableEngine$WallpaperObserver.onReceive(ImageWallpaper.java:96)
05-01 13:33:32.817: W/WallpaperManager(65): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:716)
05-01 13:33:32.817: W/WallpaperManager(65): at android.os.Handler.handleCallback(Handler.java:587)
05-01 13:33:32.817: W/WallpaperManager(65): at android.os.Handler.dispatchMessage(Handler.java:92)
05-01 13:33:32.817: W/WallpaperManager(65): at android.os.Looper.loop(Looper.java:126)
05-01 13:33:32.817: W/WallpaperManager(65): at com.android.server.ServerThread.run(SystemServer.java:576)