android Suspicious method call; should probably call "draw" rather than "onDraw"
来源:互联网 发布:lvs和nginx的区别 编辑:程序博客网 时间:2024/04/30 21:47
在ADT下,导入一个项目提示出:
Suspicious method call; should probably call "draw" rather than"onDraw"
查看代码没有问题,最后修改了onDraw-->Fix_onDraw.错误排除。
参考:
http://stackoverflow.com/questions/19124296/android-ondraw-is-a-suspicous-method-call/21311875#21311875
其中提到:
By convention, methods from Android API named like On***
should not be called directly by your code, but only by Android OS itself. I hope, someone will tell you what to use instead of it in this situation...
For the performance: if performance can become a problem, why don't you use OpenGL? (or a library that uses OpenGL)
http://stackoverflow.com/questions/14865434/override-ondraw-or-draw
另一个问题,关于引用:import org.jetbrains.annotations.NotNull;
解决办法,就是去掉代码中的标注。@Nullable and @NotNull
参考:
http://stackoverflow.com/questions/19975022/org-jetbrains-what-is-it
@Nullable and @NotNull annotations introduced in IntelliJ IDEA for catching NullPointerException's (NPE's) through the Constant Conditions & Exceptions and @Nullable problem inspections. You canDownload last version here.
- Suspicious method call; should probably call "draw" rather than "onDraw"
- android Suspicious method call; should probably call "draw" rather than "onDraw"
- 错误提示 Suspicious method call; should probably call "draw" rather than "onDraw" 的解决方法
- Draw Call
- Draw Call Batching
- NGUI减少draw call
- Draw Call Batching
- Draw Call Batching介绍
- Unity降低Draw Call
- U3D Draw call batching
- NGUI Draw Call优化
- NGUI 减少Draw Call
- NGUI 减少Draw Call
- OpenGL ES draw call优化
- Unity 性能优化 Draw Call
- Unity3D教程:优化Draw Call
- Unity 性能优化 Draw Call
- 关于Draw call的资料
- 为Cubieboard打造完美Debian系统
- c# [ImportDll()] 知识小结
- Hadoop 权限管理
- UVa 2678 Subsequence / 二分
- Clover
- android Suspicious method call; should probably call "draw" rather than "onDraw"
- uva 10755 - Garbage Heap(最大和问题)
- HBase设计与开发性能优化
- 书本例子strindex函数
- Flex 读写xml文件的方法_Flex
- poj2923 状压记忆化搜索
- 第四届(2013年十月)福建省大学生程序设计竞赛
- Android xml资源文件中@、@android:type、@*、?、@+含义和区别
- Configuring Automatic Debugging