I understand that this is an old question, but when faced with this problem, I want to make sure that it is accessible to everyone :)
Adding a view to your PercentRelativeLayout will result in a visual error in a text editor. It may not appear even on the screen. Go ahead and run your emulator and it should solve the visibility problem.
To fix the error, just add android:layout_width="0dp" If your widthPercent and heightPercent set accordingly, you will not have a problem.
Here is my sample verified code
android:text="Label label" android:id="@+id/btn1" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_alignParentTop="true" app:layout_widthPercent="50%" app:layout_heightPercent="30%" android:textSize="17sp"/> <Button android:text="Other other other" android:id="@+id/btn2" android:layout_height="wrap_content" android:layout_width="0dp" android:layout_toRightOf="@id/btn1" app:layout_widthPercent="50%" app:layout_heightPercent="30%" android:textSize="17sp"/>
source share