Error in method oncreat() when using shape android

2019-03-03 09:09发布

问题:

When I try to use the shapes in the design of Android applications, it is an error occurs without any details please help me

My XML Code :

<EditText android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/editText2"
            android:background="@drawable/yazeed"
            android:textSize="15sp"
            android:textStyle="bold"
            android:layout_gravity="center_horizontal"
            android:gravity="center"
            android:hint="Domain Name: Administrator@contos" />

My Shape :

<?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/androidandroid:shape="rectangle">
        <solid android:color="#fff" />
    <size android:height="35dp"></size>
    <corners android:radius="10dp" />
        <stroke android:width="2dip" android:color="#5e05667a" />
    </shape>

The LogCat :

10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:636)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:484)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:813)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.content.res.Resources.loadDrawable(Resources.java:2822)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.View.<init>(View.java:3419)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.View.<init>(View.java:3356)
10-24 20:23:40.040  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.ViewGroup.<init>(ViewGroup.java:426)
10-24 20:23:40.050  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.widget.RelativeLayout.<init>(RelativeLayout.java:184)
10-24 20:23:40.050  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at java.lang.reflect.Constructor.constructNative(Native Method)
10-24 20:23:40.050  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
10-24 20:23:40.050  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.LayoutInflater.createView(LayoutInflater.java:593)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.LayoutInflater.inflate(LayoutInflater.java:467)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:318)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.app.Activity.setContentView(Activity.java:1925)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at info.androidhive.slidingmenu.Login.onCreate(Login.java:11)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.app.Activity.performCreate(Activity.java:5203)
10-24 20:23:40.060  28401-28401/info.androidhive.slidingmenu I/dalvikvm﹕ at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)

Thank you for help :)