Android 仅在第一次启动时生产中出现空指针错误

Android 仅在第一次启动时生产中出现空指针错误,android,titanium,appcelerator,appcelerator-titanium,appcelerator-alloy,Android,Titanium,Appcelerator,Appcelerator Titanium,Appcelerator Alloy,目前,我在将钛合金应用程序部署到play store时遇到了一个问题,当我第一次启动它时,它就崩溃了。这只发生在生产中 当我报告此问题时,我在开发人员控制台中发现了以下内容: java.lang.NullPointerException:尝试调用虚拟方法 'android.content.res.Resources android.content.Context.getResources()' 位于的空对象引用上 获取(ViewConfiguration.java:359) android.vi

目前,我在将钛合金应用程序部署到play store时遇到了一个问题,当我第一次启动它时,它就崩溃了。这只发生在生产中

当我报告此问题时,我在开发人员控制台中发现了以下内容:

java.lang.NullPointerException:尝试调用虚拟方法 'android.content.res.Resources android.content.Context.getResources()' 位于的空对象引用上 获取(ViewConfiguration.java:359) android.view.view.(view.java:3663)位于 android.view.view.(view.java:3758)位于 android.widget.TextView.(TextView.java:650)位于 android.widget.TextView.(TextView.java:645)位于 android.widget.TextView.(TextView.java:641)位于 android.widget.TextView.(TextView.java:637)位于 TiUILabel$1.(TiUILabel.java:58) 位于ti.modules.tianium.ui.widget.TiUILabel.(TiUILabel.java:57) 位于ti.modules.tianium.ui.LabelProxy.createView(LabelProxy.java:63) 在 org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:490) 在 org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476) 在 org.appcelerator.titanium.proxy.TiViewProxy.handleToImage(TiViewProxy.java:965) 在 org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:280) 位于android.os.Handler.dispatchMessage(Handler.java:98) Looper.loop(Looper.java:211)位于 main(ActivityThread.java:5373)位于 java.lang.reflect.Method.invoke(本机方法)位于 java.lang.reflect.Method.invoke(Method.java:372)位于 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020) 位于com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

因为我不知道excalty在哪里出了问题,因为它正在生产中,所以我不知道应该提供什么代码。我知道这是一个空引用错误,但在我的应用程序中,我没有使用getResources()函数或类似的函数

我第二次运行它时,它就工作了

钛合金版本:6.0.1.GA

MacOSX:10.12.3

目标android SDK:23

安卓版本:5.1


任何帮助都将被感激

可能的重复不是重复资源用于样式或图像。您的错误似乎表明存在
或视图属性。您是在尝试重写特定属性,还是依赖于TextView的存在?您是否将任何内容存储到内存并在以后使用(例如属性)它的可能副本不是副本资源用于样式或图像。您的错误似乎表明存在
或视图属性。您是在尝试重写特定属性,还是依赖于TextView的存在?您是否将任何内容存储到内存中并在以后使用(例如属性)