2016-04-05 14 views
2

私はパーセントの相対レイアウトを実装しようとしている、と私はこのチュートリアルを次のようだ:Androidのレンダリングの問題、パーセントレイアウト

https://blog.stylingandroid.com/percent-part-1/

私のコード内のエラーがあるようには思えません、しかしそこにまだプレビューません、それは言う:

「レンダリング中に発生したレンダリング問題 例外:アンドロイド/サポート/パーセント/ Rの$のスタイル可能」何が間違って

任意のアイデア? 'build.gradle(モジュール:アプリ)' から

私の依存関係は、以下のとおりです。

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' 
} 

上に二人は最初からありました。

私のXMLファイル:

<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> 

答えて

0

私はそれを解決したと思います。初期化タグからパディング属性を削除します。うまくいけば、これは同じ問題を抱えた他の人にとって助けになるでしょう。

関連する問題