Had a crash while trying to use the new TextInputField for Android and wanted to share my solution.
Trying the new TextInputField in the android appcomp
None of the solution worked for me. I am using
compile 'com.android.support:appcompat-v7:28.0.0'
compile 'com.android.support:design:28.0.0'
Tried all the soluton. My app runs perfectly in devices with lower sdk. But crashes in newer( greater than sdk 26) devices. But after scratching head for 2 days finally got the solution.
my layout editor showed the error of
The following classes could not be instantiated:
- android.support.design.widget.TextInputLayout
But it did not gave me enough information to work with. It was not until I looked at other errors at the layout editor. Under render problem I found that
Couldn't resolve resource @string/path_password_strike_through
I finally got the solution after investigating this render problem. All you need to do is add
app:passwordToggleDrawable="@string/string_name"
in your TextInputLayout xml file.