Reputation: 2503
This app has been built and run many times, including many times today, yesterday, etc.
Now, suddenly there are errors with the axml which hasn't changed i a while: One error is supposedly in activity_mail.axml. Most of the time at line 114 but sometimes at line 117.
Either those lines are blank or they contain perfectly valid axml.
Even if I add lines before 114 (or 117), the error is still at 114 or 117 or 113.
The axml is a Linear Layout, with a table layout followed by 8 table rows with contain EditViews, TextViews and Buttons. Much of the time it builds with no problem.
This is axml that (1) hasn't been changed in a while and (2) previous, like earlier today, compiled just fine and ran on my phone just fine.
BUT now I find these groups inserted into the axml (I've watched it happen):
<TextView
android:minWidth="30px"
android:minHeight="30px"
xmlns="http://schemas.android.com/apk/res/android"
android:id="@+id/textView4" />
<TextView
android:minWidth="30px"
android:minHeight="30px"
xmlns="http://schemas.android.com/apk/res/android"
android:id="@+id/textView5" />
<TextView
android:minWidth="30px"
android:minHeight="30px"
xmlns="http://schemas.android.com/apk/res/android"
android:id="@+id/textView6" />
When it happens, there are 5 or 6 groups of them. Always the same. Mostly in groups of 3 and the width and height are always 30px. At the end of the axml sometimes there is one of these one or two lines long. Today this happened over and over.
Today was by far the worst. Each time I rebuild the app, the build fails as these groups are inserted into the axml. Six times today so far.
I've tried deleting the bin and obj folders the Resource.Designer.cs file, but that didn't help.
I'm using VS 2019 (Community) Version 16.3.9 on Windows 10 Enterprise.
I can't make the axml read only as that (for no reason I can understand) causes the build to fail.
I have rebooted my computer, but that changed nothing.
Upvotes: 0
Views: 51
Reputation: 14991
in your axml,each element should contains width and height properties,so you try to change your axml like below :
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="30px"
android:minHeight="30px"
android:id="@+id/textView4" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="30px"
android:minHeight="30px"
android:id="@+id/textView5" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="30px"
android:minHeight="30px"
android:id="@+id/textView6" />
Upvotes: 0