Ich versuche, die Prozent relativer Layout zu implementieren, und ich bin nach dieser Anleitung:Android-Rendering-Probleme, Prozent Layout
https://blog.stylingandroid.com/percent-part-1/
Es scheint nicht irgendwelche Fehler in meinem Code zu sein, aber es gibt noch keine Vorschau, und es sagt:
"Rendering Probleme Ausnahme ausgelöst während des Renderings: android/support/Prozent/R $ frisierbar"
Jede Idee, was falsch ist?
Meine Abhängigkeiten von 'build.gradle (Modul: app)' sind:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:24.0.0-alpha1'
compile 'com.android.support:percent:23.0.0'
}
Die beiden auf der Spitze gab es von Anfang an.
Meine XML-Datei:
<android.support.percent.PercentRelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_paddingRightPercent="2%"
app:layout_paddingLeftPercent="2%"
app:layout_paddingBottomPercent="2%"
tools:context="companyname.appname.SeLister">
<TextView android:text="Reklame"
app:layout_heightPercent="10%"
app:layout_widthPercent="50%"
android:id="@+id/listereklame"
android:textColor="#000000"
android:background="@drawable/tekstboks1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="16dp"
/>
</android.support.percent.PercentRelativeLayout>