There might be many other reason to this. But here I am going to share what I faced and how I fixed it.
Let’s consider you want to have an EditText for taking only alpha numeric values as input. So here is an Android XML layout which will cause the error mentioned.
If you observe closely, the EditText has
android:digits attribute for filtering the allowed characters for input. This attribute is the cause behind this problem.
So to avoid this problem, you have to add
android:singleLine attribute. Below is the final working XML.
If we have
android:digits attribute in
android:imeOptions will work ones we add