为什么ImageView没有在更高的API上显示图像

时间:2017-11-28 14:09:26

标签: java android xml android-layout android-studio

我正在制作4个按钮,里面有图像按钮和文本下划线,我想在按下按钮时更改ImageView图像。我一直在Android 4.0.4 API14上测试它,一切都很好。这些图像工作正常,但是当我将EMULATOR切换到更新的API(如20+)时,会显示imageview中的图像,但是当我按下时,图像不再可见,直到我重新启动活动或按顶部返回按钮。有人可以帮我做这件事吗?

MainActivity java class -

Nov 28, 2017 4:52:46 PM com.sun.faces.lifecycle.ProcessValidationsPhase execute
WARNING: /form_tour.xhtml @12,49 value="#{tourBean.kindOfTour}": Target Unreachable, identifier [tourBean] resolved to null
javax.el.PropertyNotFoundException: /form_tour.xhtml @12,49 value="#{tourBean.kindOfTour}": Target Unreachable, identifier [tourBean] resolved to null
at com.sun.faces.facelets.el.TagValueExpression.getType(Unknown Source)
at        org.primefaces.util.ComponentUtils.getConverter(ComponentUtils.java:146)
at org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:176)
at javax.faces.component.UIInput.getConvertedValue(Unknown Source)
at javax.faces.component.UIInput.validate(Unknown Source)
at javax.faces.component.UIInput.executeValidate(Unknown Source)
at javax.faces.component.UIInput.processValidators(Unknown Source)
at javax.faces.component.UIForm.processValidators(Unknown Source)
at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
at javax.faces.component.UIViewRoot.processValidators(Unknown Source)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(Unknown Source)
at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
at javax.faces.webapp.FacesServlet.service(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier [tourBean] resolved to null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:74)
at org.apache.el.parser.AstValue.getType(AstValue.java:58)
at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:168)
... 37 more

Nov 28, 2017 4:52:46 PM com.sun.faces.context.AjaxExceptionHandlerImpl handlePartialResponseError
SEVERE: javax.el.PropertyNotFoundException: /form_tour.xhtml @12,49 value="#{tourBean.kindOfTour}": Target Unreachable, identifier [tourBean] resolved to null
at com.sun.faces.facelets.el.TagValueExpression.getType(Unknown Source)
at org.primefaces.util.ComponentUtils.getConverter(ComponentUtils.java:146)
at org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:176)
at javax.faces.component.UIInput.getConvertedValue(Unknown Source)
at javax.faces.component.UIInput.validate(Unknown Source)
at javax.faces.component.UIInput.executeValidate(Unknown Source)
at javax.faces.component.UIInput.processValidators(Unknown Source)
at javax.faces.component.UIForm.processValidators(Unknown Source)
at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
at javax.faces.component.UIComponentBase.processValidators(Unknown Source)
at javax.faces.component.UIViewRoot.processValidators(Unknown Source)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(Unknown Source)
at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
at com.sun.faces.lifecycle.LifecycleImpl.execute(Unknown Source)
at javax.faces.webapp.FacesServlet.service(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, identifier [tourBean] resolved to null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:74)
at org.apache.el.parser.AstValue.getType(AstValue.java:58)
at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:168)
... 37 more

XML -

Sheet3.Range("MyTable").Copy
Sheets("MyWorksheet").Range("B12:D12").Insert Shift:=xlDown

With Sheets("MyWorksheet").Range("B12").Resize(Sheet3.Range("MyTable").Rows.Count, Sheet3.Range("MyTable").Columns.Count)

    .Copy
    .PasteSpecial xlPasteValuesAndNumberFormats

End With
    Application.CutCopyMode = False    

0 个答案:

没有答案