How to fix this problem this string cannot be provided in the text widget.
How can I solve this? My code:
code
Question posted in Android Studio
The official documentation can be found here.
The official documentation can be found here.
2
Answers
I think the problem is that
fullName
is of typeString?
instead ofString
. That means you need to ensure it is not null.Either by enforcing a null check
or by providing a fallback value
or by only showing the text if fullName is not null like
Because your fullName text canbe null, try handle fullName null case: