Layout parameter layout_weight ignored unless


If I import 24_UIThemes_RemoteControl I am able to run the application in a AVD. How-ever, if I drill down to res>layout>fragment_remote_control.xml and open the file I get the following error

Description Resource Path Location Type
Layout parameter layout_weight ignored unless both layout_width and layout_height are also specified on tag fragment_remote_control.xml /24_UIThemes_RemoteControl/res/layout line 26 Android Lint Problem

Then I am unable to run the app.

I used this to overcome in my xml file




I had the same issue, but instead of forcing the compiler to ignore the errors I simply specified a “0dp” for both android:layout_width & android:layout:height parameters inside the include. The errors disappeared and no change was made on the layout anyway. Still, since I’d override those attributes of the root element, they’d be useless in the declaration.