Отсутствующие классы в папке макета Android Studio .xml файл - PullRequest
0 голосов
/ 12 ноября 2018

https://github.com/spelfit/SpelFit

У меня проблема с моим приложением для Android. Это мой первый, у меня пока есть страница входа и регистрации. Поля для электронной почты, пароля и подтверждения пароля не отображаются. Ошибка говорит о том, что отсутствуют два класса, но я определил их в папке Layout activity_login.xml

не найдены следующие классы:

- android.support.design.widget.TextInputEditText (исправить путь сборки, изменить XML, создать класс) - android.support.design.widget.TextInputLayout (исправить путь сборки, изменить XML, создать класс)

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/nestedScrollView"
        android:background="@color/colorPrimaryDark"
        android:padding='20dp'
        tools:context="activities.LoginActivity">

        <android.support.v7.widget.LinearLayoutCompat
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <android.support.v7.widget.AppCompatImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="40dp"
                android:src="@drawable/logo" />

            <android.support.design.widget.TextInputLayout
                android:id="@+id/textInputLayoutName"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dp">

                <android.support.design.widget.TextInputEditText
                    android:id="@=id/textInputEditTextName"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/hint_name"
                    android:textColorHint="@color/colorText"
                    android:inputType="text"
                    android:maxLines="1"
                    android:textColor="@color/colorText"/>
            </android.support.design.widget.TextInputLayout>

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

                <android.support.design.widget.TextInputEditText
                    android:id="@=id/textInputEditTextEmail"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/hint_email"
                    android:textColorHint="@color/colorText"
                    android:inputType="text"
                    android:maxLines="1"
                    android:textColor="@color/colorText"/>
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/textInputLayoutPassword"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp">

                <android.support.design.widget.TextInputEditText
                    android:id="@=id/textInputEditTextPassword"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/hint_password"
                    android:textColorHint="@color/colorText"
                    android:inputType="textPassword"
                    android:maxLines="1"
                    android:textColor="@color/colorText"/>
            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/textInputConfirmPassword"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="20dp">

                <android.support.design.widget.TextInputEditText
                    android:id="@=id/textInputEditConfirmPassword"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/confirm_password"
                    android:textColorHint="@color/colorText"
                    android:inputType="textPassword"
                    android:maxLines="1"
                    android:textColor="@color/colorText"/>
            </android.support.design.widget.TextInputLayout>

            <android.support.v7.widget.AppCompatButton
                android:id="@+id/appCompatButtonRegister"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="40dp"
                android:textColor="@color/colorText"
                android:background="@color/colorTextHint"
                android:text="@string/text_register"/>

            <android.support.v7.widget.AppCompatTextView
                android:id="@+id/appCompatTextViewLoginLink"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="30dp"
                android:gravity="center"
                android:text="@string/text_member"
                android:textSize="16sp"
                android:textColor="@color/colorText" />






        </android.support.v7.widget.LinearLayoutCompat>

    </android.support.v4.widget.NestedScrollView>

журнал ошибок pt2

журнал ошибок

1 Ответ

0 голосов
/ 12 ноября 2018

Я думаю, что вы не реализовали следующий Gradle. Пожалуйста, проверьте эти Gradle в вашем Gradle файле и помните, что версия SDK должна быть такой же.

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...