2016-06-16 10 views
1

Ich habe ein Upgrade Android Studio 2.2 Vorschau 3 vor kurzem aber die EditText Stil geändert, in der Vorschau: enter image description hereAndroid Studio 2.2 EditText Border

Aber laufen auf meinem Handy, es wie folgt aus: enter image description here

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/activity_main" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="com.hyh.newlearn.MainActivity"> 

    <TextView 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Hello World!" /> 

    <EditText 
     android:id="@+id/et_show" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_centerInParent="true" 
     android:hint="Hello World"/> 

</RelativeLayout> 

styles.xml:

<resources> 

    <!-- Base application theme. --> 
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
     <!-- Customize your theme here. --> 
     <item name="colorPrimary">@color/colorPrimary</item> 
     <item name="colorPrimaryDark">@color/colorPrimaryDark</item> 
     <item name="colorAccent">@color/colorAccent</item> 
    </style> 

</resources> 

Warum? Wie man damit umgeht?

Antwort

1
buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.0-alpha3' 
//  classpath 'com.android.tools.build:gradle:1.5.0' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

Wenn ich Classpath verwenden 'com.android.tools.build:gradle:2.2.0-alpha3', wird die Fehleransicht zeigen.

Wenn ich den Klassenpfad 'classpath' com.android.tools.build:gradle:1.5.0 '' verwende, wird die richtige Ansicht angezeigt.

Verwandte Themen