Java/XML newbie using Android Studio 3.1.1, I receive an error:
error: not well-formed (invalid token).
Message{kind=ERROR, text=error: not well-formed (invalid token)., sources=[C:\...\MyWebFavourites\app\src\main\res\layout\activity_main.xml:20], original message=, tool name=Optional.of(AAPT)
From this answer, I have tried creating this code:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.mywebfavourites.MainActivity">
<EditText
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:text="Paid WP Maintenance"
tools:layout_editor_absoluteX="25dp"
tools:layout_editor_absoluteY="27dp" />
<TextView
textView =(TextView)findViewById(R.id.editText)
textView.setClickable(true)
textView.setMovementMethod(LinkMovementMethod.getInstance())
String text = "<a href='https://www.example.com/'>Example</a>"
textView.setText(Html.fromHtml(text)) />
Line 20 is textView =(TextView)findViewById(R.id.editText)
. I can't see what is not well-formed about this line.
Can you help please?