Ich entwerfe ein Formular mithilfe eines Tabellenlayouts, aber der Compiler beschwert sich, dass eine Anzahl von Attributen entweder nicht definiert oder nicht zulässig ist. Hier ist ein Ausschnitt des Layouts:Xamarin Android Forms-Designer erkennt GridLayout-Layoutparameter nicht
<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/gridLayout1"
android:columnCount="2"
android:rowCount="2">
<LinearLayout
android:orientation="vertical"
android:minWidth="25px"
android:minHeight="25px"
android:id="@+id/player1Layout"
android:layout_column="0"
android:layout_row="0"
android:background="@android:color/holo_green_dark"
android:layout_gravity="fill"
android:layout_columnWeight="1"
android:layout_rowWeight="1"
android:layout_margin="1" />
Wenn ich kompilieren, erhalte ich die beiden Warnungen und den layout_*
Attribute Fehlern. Im Moment habe ich gesetzt, alle drei API-Ebene (kompilieren, Ziel und mindestens) 26, die ich bin ziemlich sicher, all diese Eigenschaften hat, aber ich habe die folgenden Fehler:
error APT0000: 1: error: Error: Integer types not allowed (at 'layout_margin' with value '1').
error APT0000: 1: error: Error: Integer types not allowed (at 'layout_margin' with value '1').
error APT0000: 1: error: Error: Integer types not allowed (at 'layout_margin' with value '1').
error APT0000: 1: error: Error: Integer types not allowed (at 'layout_margin' with value '1').
The 'http://schemas.android.com/apk/res/android:layout_column' attribute is not declared.
The 'http://schemas.android.com/apk/res/android:layout_row' attribute is not declared.
The 'http://schemas.android.com/apk/res/android:layout_columnWeight' attribute is not declared.
The 'http://schemas.android.com/apk/res/android:layout_rowWeight' attribute is not declared.
Ihre Fehler für die ‚layout_margin‘ ist Integer-Typen nicht erlaubt, ja es dichteunabhängige Punkte erlaubt .... so etwas wie dieses android: layout_marginRight = „1 dp“ –