开发者

OutOfMemory error in Android with the latest AdMobSDK

I have implemented the newest version of the AdMobSDK in one of my aps and I get the following error every time the application requests a new ad:

   06-17 15:52:20.847: ERROR/AdMobSDK(22213): couldn't create a Bitmap                                                                       
    06-17 15:52:20.847: ERROR/AdMobSDK(22213): java.lang.OutOfMemoryError: bitmap size exceeds VM budget                                      
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method)                     
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:495)                  
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:508)                  
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at com.admob.android.ads.u.a(AssetDownloader.java:211)                                     
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at com.admob.android.ads.i.d(AdMobURLConnector.java:201)                                   
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at com.admob.android.ads.i.run(AdMobURLConnector.java:284)                                 
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)         
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)         
    06-17 15:52:20.847: ERROR/AdMobSDK(22213):     at java.lang.Thread.run(Thread.java:1096)           

I am using AdMob version 4.1.0. With the old version of AdMob (version 20101109) the application works fine. Can someone suggest a solution? I am testing the application on a Samsung Galaxy S phone. The strange thing is that it used to work before, and I sometimes view ads in the 开发者_开发知识库application.

I am not using any large bitmaps in the application, only a few 15 tp 35 K png files - I am also using recycle for some Bitmap decode operations.

Can someone suggest a solution?

Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜