В XML предложений больше нет - PullRequest
1 голос
/ 28 мая 2020

Я больше не получаю предложения автозаполнения в моих файлах XML. Я не уверен, что я сделал. Я думаю, что это должно что-то делать с моим файлом Gradle, но не может точно определить. Насколько я понимаю, это " xmlns: tools =" http://schemas.android.com/tools ". Я думаю, проблема может заключаться в том, что я использую кнопки материалов и совместимость приложений или что-то в этом роде. У меня есть также повторно синхронизировал Gradle несколько раз. Обычно я мог ввести что-то вроде «wi», и в нем появилось раскрывающееся меню с кучей предложений. Кто-нибудь может обнаружить проблему?

Gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"

    defaultConfig {
        applicationId "com.example.firetest"
        minSdkVersion 16
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    implementation 'com.lorentzos.swipecards:library:1.0.9'
    implementation "androidx.cardview:cardview:1.0.0"
    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-database:19.2.1'
    implementation 'com.google.firebase:firebase-auth:19.2.0'
    implementation 'com.google.firebase:firebase-storage:19.1.1'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    //implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.recyclerview:recyclerview-selection:1.1.0-rc01'
    implementation 'com.google.android.material:material:1.2.0-alpha06'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'


}

Пример XML:

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_weight="100"
    android:orientation="vertical"
    tools:context=".SignUpProcess.PhotoActivity.Photo_Activity">

    <LinearLayout

        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:weightSum="20">

        <TextView
            android:layout_width="204dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="33dp"
            android:layout_marginTop="33dp"
            android:fontFamily="@font/roboto_black"
            android:text="Add your photos here"
            android:textColor="@android:color/holo_green_light"
            android:textSize="32dp" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="33dp"
            android:layout_marginTop="3dp"
            android:fontFamily="@font/roboto_black"
            android:text="Please add at least three photos"
            android:textColor="@android:color/black"
            android:textSize="12dp" />

    </LinearLayout>

    <LinearLayout

        android:id="@+id/rl"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center_horizontal"
        android:orientation="vertical"
        android:weightSum="66"
        tools:context=".SignUpProcess.PhotoActivity.Photo_Activity">

        <androidx.recyclerview.widget.RecyclerView

            android:layout_marginTop="20dp"
            android:id="@+id/recycler_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:clipToPadding="false">

        </androidx.recyclerview.widget.RecyclerView>

        <ImageButton
            android:id="@+id/continueBtn"
            android:layout_width="wrap_content"
            android:layout_height="52dp"
            android:layout_gravity="center"
            android:layout_marginBottom="223dp"
            android:background="@null"
            android:scaleType="fitCenter"
            android:src="@drawable/next_btn" />

    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:weightSum="14dp">

    </LinearLayout>

1 Ответ

0 голосов
/ 28 мая 2020

Одна из возможностей - проверить power mode в студии android. От Go до File > Power mode и проверьте, включен он или нет. Если он включен, Вы также не получите никаких предложений.

Обновление: Если это не сработает для вас, вы должны сбросить свою Android студию, которая установит для вас конфигурацию по умолчанию. Для этого найдите папку .AndroidStudioBeta или .AndroidStudio, удалите их и перезапустите android studio. Обычно эта папка попадает в users\[user name]\.

Дайте мне знать, если это вам поможет. Удачного кодирования ..!

...