zoukankan      html  css  js  c++  java
  • 异常

    在Android平台下,进行多线程编程时,经常需要在主线程之外的一个单独的线程中进行某些处理,然后更新用户界面显示。但是,在主线线程之外的线程中直接更新页面显示的问题是


    1、报异常:android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.

    【只有原始创建这个视图层次(view hierachy)的线程才能修改它的视图(view)】

    2、Bitmap too large to be uploaded into a texture(433x4346, max=4096x4096)

    就算图片读入内存没有OOM,也要保证图片大小最大4096x4096,否则会出现如上异常,这是android系统决定的,

    超过4096x4096的图片资源Android的View是无法渲染的。

     3、 java.net.SocketException: socket failed: EACCES (Permission denied)
     加入Internet权限

  • 相关阅读:
    C#中的委托和事件的使用
    C#中Attribute/特性的使用
    Eclipase + CDT
    设计模式总结
    Nginx源码编译
    Nginx自定义扩展模块
    电池的寿命
    大盗阿福
    河中跳房子
    An Easy Problem
  • 原文地址:https://www.cnblogs.com/DASOU/p/4235309.html
Copyright © 2011-2022 走看看