1

I currently have an issue when I deploy my Titanium alloy application to the play store, when I launch it for the first time it crashes. This only happens in production.

When I reported the issue the following is what I found in the developer console:

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference at android.view.ViewConfiguration.get(ViewConfiguration.java:359) at android.view.View.(View.java:3663) at android.view.View.(View.java:3758) at android.widget.TextView.(TextView.java:650) at android.widget.TextView.(TextView.java:645) at android.widget.TextView.(TextView.java:641) at android.widget.TextView.(TextView.java:637) at ti.modules.titanium.ui.widget.TiUILabel$1.(TiUILabel.java:58) at ti.modules.titanium.ui.widget.TiUILabel.(TiUILabel.java:57) at ti.modules.titanium.ui.LabelProxy.createView(LabelProxy.java:63) at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:490) at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:476) at org.appcelerator.titanium.proxy.TiViewProxy.handleToImage(TiViewProxy.java:965) at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:280) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:211) at android.app.ActivityThread.main(ActivityThread.java:5373) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

Since I don't know where excalty it went wrong since it is in production I don't know what code to supply. I understand it is a null reference error, but nowhere in my application I use a getResources() function, or something like that.

The second time I run it it just works

Titanium Version: 6.0.1.GA

Mac OS X: 10.12.3

Target android SDK: 23

Android version: 5.1

Any help would be appriciated!

Rene Pot
  • 24,681
  • 7
  • 68
  • 92
WesVleuten
  • 11
  • 2
  • 1
    Possible duplicate of [What is a NullPointerException, and how do I fix it?](http://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it) – Akash Patel Feb 20 '17 at 13:14
  • It is not a duplicate – WesVleuten Feb 20 '17 at 13:19
  • Resources is used for styling or images. Your error seems to indicate a `` or View property. Are you trying to override a specific property, or depending on a TextView to exist? Are you storing anything to memory and using that later (properties for example) – Rene Pot Feb 20 '17 at 13:33

0 Answers0