Android Studio not showing attributes for button

Issue

I opened a blank Android application in Android Studio and when I attempt to edit a button, the attributes are not present. I’m new to Android development and following a guide which shows how to change the text in the button, but the attributes menu lacks the options seen in the guide.

Using:

  • Android Studio 3.2.1
  • Gradle 4.6 (Updated from 4.5)
  • Android Plugin Version 3.2.1
  • Windows 10

I updated Gradle and did Invalidate Caches/Restart with no change to the interface.

How my interface looks:

enter image description here

How the interface should look:

enter image description here

A similar situation that did not resolve my issue.

The revlavent XML file which was created via Android Studio’s default file templet

      <?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">

          <Button
              android:id="@+id/button"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginStart="8dp"
              android:layout_marginEnd="8dp"
              android:layout_marginBottom="8dp"
              android:text="@string/button"
              app:layout_constraintBottom_toBottomOf="parent"
              app:layout_constraintEnd_toEndOf="parent"
              app:layout_constraintStart_toStartOf="parent" />

          <EditText
              android:id="@+id/editText"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              android:ems="10"
              android:inputType="textPersonName"
              android:text="Name"
              tools:layout_editor_absoluteX="181dp"
              tools:layout_editor_absoluteY="337dp" />
      </android.support.constraint.ConstraintLayout>

Solution

Please try this first check if there is any anomaly in your XML code!
if yes then fix it first and then
GOTO File > Invalidate Caches and Restart. After restart note that it takes a little more time to start but this will surely fix your issue.

and if that does not then use this

EXTREME STEP

Well there are plenty of solutions to deal with android studio designView Rendering.

what i used to do in my utmost cases when i was kind of on low spec system is something like this

if WINDOWS is your OS then just follow the steps:

1: Close your Android studio if running

2: Make sure no shortcut icon is present in the bottomBar or desktop(optional)

3: Open C:/Users/{your_USER_NAME}/ and just delete .AndroidStudio{VERSIONCODE} folder

what does this folder do? well it saves your custom android studio
themes, styles, shortcuts etc

after deleting it

4: Check you are connected to Internet

5: open the android studio and it should present you with again setting screens like what theme you would like to use etc! just go with recommended

6: follow the recommended steps at first after that if anything android studio is missing it will download!

7: try creating a new project then!

REMEMBER you do not need to remove .gradle for just simple UI/UX glitches of android studio! just remove .androidStudo3..(

Answered By – MonkeyDLoofi

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published