Привет, мое приложение вылетает всякий раз, когда я запускаю его, я проверял Logcat, и он выдает эту строку ошибки
Мой код и структура моего приложения ниже, я искал ответ и надеюсь, что кто-нибудь поможет мне,
заранее спасибо
Caused by: android.view.InflateException: Binary XML file line #51:
Error inflating class Button.
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f070063 a=-1 r=0x7f070063}
вот мой XML
<?xml version="1.0" encoding="utf-8"?> android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<!--tools:layout_editor_absoluteX="16dp"-->
<!--tools:layout_editor_absoluteY="81dp"-->
<android.support.constraint.ConstraintLayout
android:layout_width="135dp"
android:layout_height="203dp"
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:layout_marginTop="60dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textView_login"
style="@style/Longin"
android:layout_width="69dp"
android:layout_height="30dp"
android:layout_marginLeft="4dp"
android:layout_marginStart="4dp"
android:text="@string/app_loging"
android:translationZ="3dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.15" />
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:layout_width="172dp"
android:layout_height="431dp"
android:layout_marginTop="64dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
android:id="@+id/backedbackground"
style="@style/first"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginStart="16dp"
android:background="@drawable/first"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView_signup"
style="@style/Longin"
android:layout_width="69dp"
android:layout_height="30dp"
android:layout_marginEnd="8dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="24dp"
android:text="@string/app_singup"
android:textColor="@color/colorwhite"
android:translationZ="3dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.908"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:layout_width="312dp"
android:layout_height="319dp"
android:layout_marginTop="124dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/signupfrontbackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
/>
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="62dp"
android:layout_marginTop="24dp"
android:drawableRight="@drawable/ic_user_male_black_shape"
android:ems="10"
android:hint="User name"
android:inputType="textPersonName"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:drawableRight="@drawable/ic_envelope"
android:ems="10"
android:hint="@string/app_Email"
android:inputType="textEmailAddress"
android:translationZ="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.329" />
<EditText
android:id="@+id/editText3"
android:layout_width="wrap_content"
android:layout_height="59dp"
android:layout_marginTop="140dp"
android:drawableRight="@drawable/ic_key"
android:ems="10"
android:hint="@string/app_Password"
android:inputType="textPassword"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button2" />
<EditText
android:id="@+id/editText4"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_marginTop="200dp"
android:drawableRight="@drawable/ic_key"
android:ems="10"
android:hint="@string/app_Confirm_password"
android:inputType="textPassword"
android:translationZ="2dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/button2"
/>
</android.support.constraint.ConstraintLayout>
<Button
android:id="@+id/button"
android:layout_width="128dp"
android:layout_height="38dp"
android:layout_marginBottom="44dp"
android:layout_marginEnd="116dp"
android:layout_marginRight="116dp"
android:background="@drawable/signupbutton"
android:text="@string/app_singup"
android:textColor="@color/colorwhite"
android:translationZ="2dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
/>
</android.support.constraint.ConstraintLayout>
мой стиль
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<dimen name="topRightRadius">65dp</dimen>
<dimen name="textSize">20dp</dimen>
<style name="first">
<item name="android:topRightRadius">@dimen/topRightRadius</item>
<!--<item name="android:radius">65dp</item>-->
<item name="android:background">@color/colorAccent</item>
</style>
<style name="Longin">
<item name="android:textColor">@color/colorwhiteblack</item>
<item name="android:textSize">20dp</item>
</style>
</resources>
Манифест
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.ali.myapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
моя строка
<resources>
<string name="app_name">My Doctor</string>
<string name="app_loging">Login</string>
<string name="app_singup">Sign up</string>
<string name="app_Email">Email</string>
<string name="app_Password">Password</string>
<string name="app_Confirm_password">Confirm password</string>
</resources>
мой цвет
<?xml version="1.0" encoding="utf-8"?> <resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorwhite">#ffffff</color>
<color name="colortoowhite">#efe9e9</color>
<color name="colorblack">#0d0c0c</color>
<color name="colorwhiteblack">#c1baba</color>
<color name="colorharaqua">#15c5e4</color>
<color name="coloraqua">#ed1fd3e7</color>
</resources>
Структура моего приложения Структура моего приложения ниже Структура моего приложения ниже
структура
первая
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="true">
<shape android:shape="rectangle">
<!--<corners android:topRightRadius="45dp"/>-->
<corners android:topLeftRadius="45dp"
android:topRightRadius="0.1dp"
android:bottomLeftRadius="45dp"
android:bottomRightRadius="0.1dp"/>
<gradient android:gradientRadius="45dp"
android:angle="-90" android:startColor="#5a92f0"
android:endColor="@color/colorAccent" />
</shape>
</item>
</selector>
signupfrontbackground
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape ="rectangle">
<corners android:radius="20dp"/>
<solid android:color="@color/colorwhite"/>
<stroke
android:color="@color/colortoowhite"
android:width="1dp"
/>
<!--<padding-->
<!--android:right="10dp"-->
<!--android:bottom="10dp"-->
<!--android:left="10dp"-->
<!--android:top="10dp"/>-->
</shape>
кнопка регистрации
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient
android:startColor="@color/colorharaqua"
android:endColor="@color/coloraqua"
android:angle="360"
/>
<corners android:topLeftRadius="105dp"
android:bottomLeftRadius="105dp"
android:topRightRadius="95dp"
android:bottomRightRadius="95dp"
/>
</shape>