Imran Sk
Imran Sk

Reputation: 327

Android widgets is not showing its attributes Suggestions when i going to write

Android Weight is not showing its attributes when I try write its property. But it works if write. Now I want to watch a suggestion when I write. how can I solve this problem? Check image for more clarity.

enter image description here

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="match_parent">


<TextView
    android:id="@+id/textView2"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:padding="10dp"
    android:text="TextView"
    android:textColor="#000"
    android:textSize="30sp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />
 </androidx.constraintlayout.widget.ConstraintLayout> 

[UPDATE] i alse add my app/build.gradle file i restart my android studio but i face the same problem. i create a new project the problem belongs there.

My app/build.gradle

    apply plugin: 'com.android.application'

    android {
        compileSdkVersion 28
        defaultConfig {
          applicationId "com.rocketechit.officemanagementapp"
          minSdkVersion 16
          targetSdkVersion 28
         versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    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.0.0-beta01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
    implementation 'com.google.android.material:material:1.0.0-beta01'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'

    //Butter knife
    implementation 'com.jakewharton:butterknife:10.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

    //firebase
    implementation 'com.google.firebase:firebase-core:16.0.1'
    implementation 'com.google.firebase:firebase-auth:16.0.3'
    implementation 'com.google.firebase:firebase-database:16.0.1'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'

    //picasso
    implementation 'com.squareup.picasso:picasso:2.71828'
    //circle image view
    implementation 'de.hdodenhof:circleimageview:3.0.0'
//custom calender
    implementation 'sun.bob:mcalendarview:1.0.0'

    //scanner

    implementation 'com.google.zxing:core:3.2.1'
    implementation 'com.journeyapps:zxing-android-embedded:3.2.0@aar'

}
apply plugin: 'com.google.gms.google-services'

Upvotes: 2

Views: 828

Answers (2)

Tonnie
Tonnie

Reputation: 8112

Just navigate to your android studio installation directory, i.e,

yourDrive:/.AndroidStudio3.4/system

first close android studio, if its running.

then delete the cache folder in system

Then start Android Studio again. Done.

i am using android studio 3.5

Upvotes: 0

Rahul Khurana
Rahul Khurana

Reputation: 8834

File -> Invalidate Caches / Restart... -> Select Invalidate and Restart

Try the above code it will clean up all the caches from android studio. Hope it will works :)

EDIT

Delete .idea folder and all .iml files from the project, then restart Android Studio and rebuild gradle will work in this case. And don't forget to Invalidate Caches / Restart as well after deletion

If the above case still doesn't work for you then you need to delete system files from android studio

yourPathToDrive:/.AndroidStudio3.3/system

Upvotes: 1

Related Questions