Hi am making my edittext to matDesign(TextInput layout).it is working fine .But when i click on date picker the app is crashing says,
My gradle file as below apply plugin: 'com.android.application' Attempt to invoke virtual method 'int android.widget.NumberPicker.getChildCount()' on a null object reference Attempt to invoke virtual method 'int android.widget.NumberPicker.getChildCount()' on a null object reference
enter code here
Not Understanding,By removing Text input layout works fine.. I have defined Theme.AppCompat.Light in manifest
NumberPicker is null, It is either not initialized or If you have used
findViewById, It has not been found, therefore, calling
getChildCount on a null object will throw NullPointerException.
Try to resolve the
NumberPicker reference and make sure that it is not null and found in your View/Activity/Fragment.