I'm working on Xamarin.Android project and after having updated all libraries to the newest and on Release version I have such an exception:
07-26 09:17:08.681 9603-9603/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: xx.xx.xx, PID: xxxx
java.lang.UnsatisfiedLinkError: No implementation found for void mono.android.text.TextWatcherImplementor.n_beforeTextChanged(java.lang.CharSequence, int, int, int) (tried Java_mono_android_text_TextWatcherImplementor_n_1beforeTextChanged and Java_mono_android_text_TextWatcherImplementor_n_1beforeTextChanged__Ljava_lang_CharSequence_2III)
at mono.android.text.TextWatcherImplementor.n_beforeTextChanged(Native Method)
at mono.android.text.TextWatcherImplementor.beforeTextChanged(TextWatcherImplementor.java:41)
at android.widget.TextView.sendBeforeTextChanged(TextView.java:10892)
at android.widget.TextView.setText(TextView.java:6220)
at android.widget.TextView.setText(TextView.java:6170)
at android.widget.EditText.setText(EditText.java:146)
at android.widget.TextView.setText(TextView.java:6127)
at android.widget.TextView.setTransformationMethod(TextView.java:2755)
at md5964384997be3f2086f58afbb264e9147.LoginView.n_onCreate(Native Method)
at md5964384997be3f2086f58afbb264e9147.LoginView.onCreate(LoginView.java:31)
at android.app.Activity.performCreate(Activity.java:7326)
at android.app.Activity.performCreate(Activity.java:7317)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3072)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3235)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1926)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:6986)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)
I've added such methods
public void Include(TextView text)
{
text.Text = $"{text.Text}";
text.AfterTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.TextChanged += (sender, args) => text.Text = $"{text.Text}";
text.BeforeTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.Hint = $"{text.Hint}";
}
public void Include(EditText text)
{
text.Text = $"{text.Text}";
text.AfterTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.TextChanged += (sender, args) => text.Text = $"{text.Text}";
text.BeforeTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.Hint = $"{text.Hint}";
}
public void Include(Android.Support.Design.Widget.TextInputEditText text)
{
text.Text = $"{text.Text}";
text.AfterTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.TextChanged += (sender, args) => text.Text = $"{text.Text}";
text.BeforeTextChanged += (sender, args) => text.Text = $"{text.Text}";
text.Hint = $"{text.Hint}";
}
to the LinkerPleaseInclude
but it still does not help. Any idea?
I tried to clear everything (bin, obj, app, visualstudio etc.)
This is a known issue. See the following issue for more details:
https://github.com/xamarin/xamarin-android/issues/3263#issuecomment-514046705
<linker>
<assembly fullname="Mono.Android">
<type fullname="Android.Text.ITextWatcherInvoker" preserve="all" />
</assembly>
</linker>
Although this is a temporary fix, we are working on resolving it in a future release.