0

I am new to developing in Android Studio, I started in Windows 10 but since Win 10 gave me some general issues, I installed Ubuntu 16.04 LTS and installed Android Studio.

Its been quite a difficult one to install Java and Android SDK again and while after all is setup, I started with one tutorial from Google for using Constraint Layout. It was all working fine but suddenly after a reboot of my machine, now I am facing strange issues.

The properties window of any component (imageview or textview) will never load and it shows 'loading' with a forever-rotating-circle.

in even log, I find this,

Image of the properties loading

IllegalArgumentException: Missing attribute definition for orientation

I thought there could be issues with Android repository not installed properly. So, I used

android sdk list -a

and installed the Android repository again. Even after multiple restart of the android studio, i still get the error.

Can someone help?

Edit: Support libraries are indeed added. Support Library in dependency in project structure

  • Did you set `android:orientation` for all `LinearLayout`s? – Ali Sheikhpour Jun 04 '16 at 11:58
  • I am using constrained layout. Like I said, I am new and I just opened the sample code given by Google. I know a bit of Java though. I looked up based on your answer and i got this. [http://stackoverflow.com/questions/6261456/layout-orientation-in-code](http://stackoverflow.com/questions/6261456/layout-orientation-in-code) . Should I try something like this? – senthilrameshjv Jun 04 '16 at 12:07
  • in android xml file all LinearLayouts should have `android:orientation="vertical"` or `android:orientation="horizontal" ` elsewhere the layout wont work. – Ali Sheikhpour Jun 04 '16 at 12:16
  • Right, but its only for linear layout. In Constrained layout, if I give android:orientation in XML it gives me warning. Will keep trying, though – senthilrameshjv Jun 04 '16 at 12:20
  • Did you import support library according to step 2 of tutorial? – Ali Sheikhpour Jun 04 '16 at 12:28
  • Please add the code of your xml file – Amr El Aswar Jun 04 '16 at 12:34
  • ` `Directly from google. So errors should be due to my setup, which i am not able to figure out – senthilrameshjv Jun 04 '16 at 12:45

1 Answers1

0

Make sure you set the orientation for your LinearLayouts and most of all make sure you are not making any spelling mistakes in your arguments for example in your LinearLayout make sure to have android:orientation="vertical" and double check for spelling mistakes like writing android:orientation="verticall"with two "l" can sometines cause these sorts of errors.

Amr El Aswar
  • 3,395
  • 3
  • 23
  • 36