我遇到这些错误,请指导我如何解决?

时间:2018-10-10 08:03:10

标签: android android-layout

您好,请帮助我解决该问题,它出现在登录和注册页面中 因此它使我的应用程序崩溃了,请帮助我摆脱这些错误。

i am attaching error picture

错误是渲染问题:

Couldn't resolve resource @string/path_password_strike_through
Failed to parse file C:\Users\Kashi\.gradle\caches\transforms-1\files-1.1\design-28.0.0-alpha3.aar\56e65747003de1b867e35f7882861c1e\res\drawable-v21\avd_show_password.xml

xml:

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView 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"
    android:id="@+id/nestedScrollView"
    android:orientation="vertical"
    android:background="@color/colorPrimary"
    tools:context=".activities.log_in">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">


    <android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/textInputLayoutEmail"
        android:layout_marginRight="20dp"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp">


        <android.support.design.widget.TextInputEditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/textInputEditTextEmail"
            android:inputType="text"
            android:textColorHint="#ffffff"
            android:hint="Email" />
    </android.support.design.widget.TextInputLayout>
    <android.support.design.widget.TextInputLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/textInputLayoutPassword"
        android:layout_marginRight="20dp"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp">


        <android.support.design.widget.TextInputEditText
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/textInputEditTextPassword"
            android:inputType="textPassword"
            android:textColorHint="#ffffff"
            android:hint="Password" />
    </android.support.design.widget.TextInputLayout>
    <android.support.design.button.MaterialButton
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/login"
        android:text="Login"
        android:layout_marginRight="20dp"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"/>
    <android.support.v7.widget.AppCompatTextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/forgottonPassword"
        android:text="Forgotton Password"
        android:textColor="#ffffff"
        android:gravity="center"
        android:layout_marginRight="20dp"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"/>
    <android.support.v7.widget.AppCompatTextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/linkRegister"
        android:text="Don't have an account ? Register now"
        android:textColor="#ffffff"
        android:gravity="center"
        android:layout_marginRight="20dp"
        android:layout_marginLeft="10dp"
        android:layout_marginTop="10dp"/>
    </LinearLayout>
</android.support.v4.widget.NestedScrollView>

2 个答案:

答案 0 :(得分:1)

这是一个错误check the issue tracker here

  

问题在于处理aapt属性内的资源解析。   此问题已在Android Studio 3.3金丝雀中修复

答案 1 :(得分:0)

您发布的xml文件没有引用任何名为“ path_password_strike_through”的字符串资源

但是我认为您很遗憾已经删除了此密钥字符串,或者从未在您的strings.xml中创建它