博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android 界面设计 java.lang.NullPointerException 异常的解决方法
阅读量:6161 次
发布时间:2019-06-21

本文共 4275 字,大约阅读时间需要 14 分钟。

如果升级到最新的SDK 19后 ,有可能在界面设计那,出现这些异常。

 

java.lang.NullPointerException	at com.android.layoutlib.bridge.impl.RenderSessionImpl.getDefaultProperties(RenderSessionImpl.java:1476)	at com.android.layoutlib.bridge.BridgeRenderSession.getDefaultProperties(BridgeRenderSession.java:68)	at com.android.ide.eclipse.adt.internal.editors.layout.gle2.ViewHierarchy.getDefaultProperties(ViewHierarchy.java:710)	at com.android.ide.eclipse.adt.internal.editors.layout.properties.XmlProperty.getStringValue(XmlProperty.java:209)	at com.android.ide.eclipse.adt.internal.editors.layout.properties.XmlProperty.getValue(XmlProperty.java:221)	at com.android.ide.eclipse.adt.internal.editors.layout.properties.XmlPropertyEditor.getText(XmlPropertyEditor.java:116)	at com.android.ide.eclipse.adt.internal.editors.layout.properties.XmlPropertyEditor.paint(XmlPropertyEditor.java:131)	at org.eclipse.wb.internal.core.model.property.table.PropertyTable.drawProperty(PropertyTable.java:1309)	at org.eclipse.wb.internal.core.model.property.table.PropertyTable.drawContent(PropertyTable.java:1151)	at org.eclipse.wb.internal.core.model.property.table.PropertyTable.handlePaint(PropertyTable.java:1094)	at org.eclipse.wb.internal.core.model.property.table.PropertyTable.access$200(PropertyTable.java:64)	at org.eclipse.wb.internal.core.model.property.table.PropertyTable$3.handleEvent(PropertyTable.java:187)	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)	at org.eclipse.swt.widgets.Composite.WM_PRINTCLIENT(Composite.java:1639)	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4590)	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)	at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)	at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2440)	at org.eclipse.swt.widgets.Button.callWindowProc(Button.java:343)	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:601)	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)	at org.eclipse.equinox.launcher.Main.run(Main.java:1438) 解决的办法 就是 把 版本 降回 18 ,就好了 ,估计是19的兼容性还有点问题。 选中你要修改的项目-〉 属性 -〉Android -> Project Build Target  改成 Android 4.3 apply  然后确定 就可以了。

转载于:https://www.cnblogs.com/huenluan/p/3555627.html

你可能感兴趣的文章
JSP的隐式对象
查看>>
JS图片跟着鼠标跑效果
查看>>
Leetcode 3. Longest Substring Without Repeating Characters
查看>>
416. Partition Equal Subset Sum
查看>>
app内部H5测试点总结
查看>>
[TC13761]Mutalisk
查看>>
while()
查看>>
常用限制input的方法
查看>>
IIS7下使用urlrewriter.dll配置
查看>>
并行程序设计学习心得1——并行计算机存储
查看>>
C++ 迭代器运算
查看>>
【支持iOS11】UITableView左滑删除自定义 - 实现多选项并使用自定义图片
查看>>
【算法笔记】多线程斐波那契数列
查看>>
java8函数式编程实例
查看>>
jqgrid滚动条宽度/列显示不全问题
查看>>
在mac OS10.10下安装 cocoapods遇到的一些问题
查看>>
css技巧
查看>>
Tyvj 1728 普通平衡树
查看>>
javascript性能优化
查看>>
多路归并排序之败者树
查看>>