Troubleshooting

SDK integration

Application crash with NPE when calling Helpshift SDK API

If you get a crash with the following error then delete the bin and obj folders on the Android project and rebuild it.

Java.Lang.RuntimeException: Unable to start activity ComponentInfo{com.helpshift.helpshiftapiexample/com.helpshift.support.activities.ParentActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference
  at java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.ContentFrameLayout.setId(int)' on a null object reference
  at at android.support.v7.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:703)
  at at android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518)
  at at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:466)
....

Xamarin forum reference :

  1. https://forums.xamarin.com/discussion/71530/resources-xml-files-cause-java-lang-nullpointerexception
  2. https://forums.xamarin.com/discussion/94043/exception-when-configuring-a-fileprovider