报错:Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener
来源:互联网 发布:砍伐树木的数据 编辑:程序博客网 时间:2024/05/21 17:15
近期在使用XListView的时候,在2.3的机器上报错,报错内容如下:
Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener, referenced from method com.zh.zhplan.view.xlistview.XListView$1.onGlobalLayout
12-19 14:48:48.336: W/dalvikvm(596): VFY: unable to resolve virtual method 15565: Landroid/view/ViewTreeObserver;.removeOnGlobalLayoutListener (Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
解决办法: if (Build.VERSION.SDK_INT < 16) {
getViewTreeObserver().removeGlobalOnLayoutListener(this);
} else {
getViewTreeObserver().removeOnGlobalLayoutListener(this);
}
由此类推,大多数此类问题都可能是adk不同导致的。
0 0
- 报错:Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener
- android 报错 java.lang.IllegalStateException: Could not find a method next(View)
- [Android]IllegalStateException: Could not find method onBind(View)
- Android Studio报错:Error[*,*]Could not find method android() for arguments [……]
- Gradle构建失败:报错Could not find method android() for arguments
- 遇到Could not find class 'android.support.v4.view.ViewPager'报错的问题
- Could not find method android() for arguments
- Android Studio Could not find method runProguard()...
- Could not find class 'android.support.v4.view.ViewPager', referenced from method***
- Could not find class 'android.support.v4.view.ViewPager', referenced from method***
- android studio编译报错Could not find property 'processResources'
- Could not find method问题解决
- Android Studio Exception: Could not find method android() for arguments
- Android Studio Exception: Could not find method android() for arguments
- Android Studio:Could not find method android() for arguments
- Could not find method update(View) in a parent or ancestor Context for android:onClick attribute def
- 报错信息:Could not find artifact
- Could not find method android.app.Activity.on.AttachedToWindow...
- 第三天
- python 根据标题获取窗口句柄,根据句柄取得进程号,关闭进程
- YARN ResourceManager 进程异常退出问题追查
- c++ string 转 char* const char* char[]
- C语言SOCKET学习
- 报错:Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener
- thinkphp框架的简单分页
- maven工程开启jetty调试
- python 获取句柄,关闭进程
- ping过程分析
- python简单文本爬虫
- jjava
- HDU1261 大数
- 加速Gradle构建项目