android 解决.XML提示ava.lang.NullPointerException at错误后XML没显示
2014-11-19 20:16
483 查看
提示错误:
意思是提示 指针或对象空,具体列表;
解决方法:点击“IphoneTreeView.java:236”会跳到错误的.JAVA代码中,
对对象或指针进行判断不为NULL再使用。如:
java.lang.NullPointerException Exception details are logged in Window > Show View > Error Log java.lang.NullPointerException at com.xxxx.ui.xxxxview.IphoneTreeView.onLayout(IphoneTreeView.java:236) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453) at android.widget.FrameLayout.onLayout(FrameLayout.java:388) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) ....
意思是提示 指针或对象空,具体列表;
解决方法:点击“IphoneTreeView.java:236”会跳到错误的.JAVA代码中,
对对象或指针进行判断不为NULL再使用。如:
int state =0; if (mAdapter != null)//加上判断就可以解决,之前是没有判断引起的 state = mAdapter.getTreeHeaderState(groupPos, childPos);
相关文章推荐
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法
- 解决android集成环境ADT的java.lang.NullPointerException错误
- Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法
- 使用Eclipse开发Android出现java.lang.NullPointerException错误的解决方法
- java.lang.NullPointerException at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked()
- Android开发中遇到Java.lang.NullPointerException解决办法
- [置顶] 【Android】AndroidStudio空指针解决之:listview与adapter的使用报空 java.lang.NullPointerException
- 在tomcat上应用web时,报java.lang.NullPointerException错误的解决方法
- java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)问题解决
- myeclipse报An error has occurred,See error log for more details. java.lang.NullPointerException错误解决办法
- cocos2dx,elipse,Errors occurred during the build,java.lang.NullPointerException打包Android错误
- Zend Studio for Eclipse的java.lang.NullPointerException错误的解决方法
- 解决Android Studio运行时报Error:java.lang.NullPointerException (no error message)错误
- ava.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.ViewGroup.getPaddi
- Java xml出现错误 javax.xml.transform.TransformerException: java.lang.NullPointerException
- 在tomcat上发布web应用时,报java.lang.NullPointerException错误的解决方法
- ava.lang.NullPointerException的一般解决方法
- java.lang.NullPointerException at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked()
- android中使用smack库时,遇到错误:java.lang.NullPointerException
- Fragment内部控件操作的E/AndroidRuntime(1778): java.lang.NullPointerException问题解决