在android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)

时间:2016-07-18 02:20:51

标签: android xml bitmap picasso

当我在Android中运行应用程序时,这些问题即将到来,我的错误如下,我正在这里复制,

  

07-17 11:46:49.780 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:503)   07-17 11:46:49.780 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:356)   07-17 11:46:49.784 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:379)   07-17 11:46:49.784 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   com.squareup.picasso.ResourceRequestHandler.decodeResource(ResourceRequestHandler.java:54)   07-17 11:46:49.784 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   com.squareup.picasso.ResourceRequestHandler.load(ResourceRequestHandler.java:45)   07-17 11:46:49.792 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   com.squareup.picasso.BitmapHunter.hunt(BitmapHunter.java:206)07-17   11:46:49.792 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   com.squareup.picasso.BitmapHunter.run(BitmapHunter.java:159)07-17   11:46:50.152 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:390)   07-17 11:46:50.152 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   java.util.concurrent.FutureTask.run(FutureTask.java:234)07-17   11:46:50.152 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)   07-17 11:46:50.152 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:573)   07-17 11:46:50.152 1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   java.lang.Thread.run(Thread.java:841)07-17 11:46:50.152
  1507-1532 / com.shubham.MeraIndore I / dalvikvm:at   com.squareup.picasso.Utils $ PicassoThread.run(Utils.java:411)

1 个答案:

答案 0 :(得分:-1)

好的,我正在向你解释这些是什么,

java.lang.Object
   ↳    android.graphics.BitmapFactory 

从各种源创建Bitmap对象,包括文件,流和字节数组。 由于内存有限,您收到错误,理想情况下,您只想在内存中加载较低分辨率的版本。较低分辨率版本应与显示它的UI组件的大小相匹配。具有更高分辨率的图像不提供任何可见的益处,但仍然占用宝贵的存储器并且由于额外的飞行缩放而产生额外的性能开销。 虽然它不会在应用程序中导致任何运行时错误。有关更多详细信息,您可以访问https://developer.android.com/training/displaying-bitmaps/load-bitmap.html