Reputation: 61
Having trouble with this error. This error just started happening and I have no idea what is causing it. I have no accessed this project in a long time, but I remember it working perfecting prior to now.
There are no additional tags and error persists after deleting final RelativeLayout tag.
Error: Can't determine type for tag '<RelativeLayout android:background="@color/backgroundcolorthree" android:id="@+id/RelativeLayout" android:layout_height="match_parent" android:layout_width="match_parent" android:orientation="horizontal" tools:context=".ninegradesecondact" 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">
<FrameLayout android:layout_below="@id/nextsatacttextview" android:layout_centerHorizontal="true" android:layout_height="wrap_content" android:layout_width="wrap_content">
<RelativeLayout android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="30dp" android:layout_width="wrap_content">
<Button android:background="@color/common_google_signin_btn_text_dark_default" android:id="@+id/profilebutton" android:layout_centerHorizontal="true" android:layout_height="100dp" android:layout_marginBottom="10dp" android:layout_marginEnd="10dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginStart="10dp" android:layout_marginTop="10dp" android:layout_toEndOf="@id/checklistbutton" android:layout_toRightOf="@id/checklistbutton" android:layout_width="100dp"/>
<Button android:background="@color/common_google_signin_btn_text_dark_default" android:id="@+id/upcomingtestsbutton" android:layout_below="@id/profilebutton" android:layout_height="100dp" android:layout_marginBottom="10dp" android:layout_marginEnd="10dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginStart="10dp" android:layout_marginTop="10dp" android:layout_width="100dp" android:textSize="13dp"/>
<Button android:background="@color/common_google_signin_btn_text_dark_default" android:id="@+id/messagesbutton" android:layout_below="@id/profilebutton" android:layout_centerHorizontal="true" android:layout_height="100dp" android:layout_marginBottom="10dp" android:layout_marginEnd="10dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginStart="10dp" android:layout_marginTop="10dp" android:layout_toEndOf="@id/upcomingtestsbutton" android:layout_toRightOf="@id/upcomingtestsbutton" android:layout_width="100dp"/>
<Button android:background="@color/common_google_signin_btn_text_dark_default" android:id="@+id/checklistbutton" android:layout_height="100dp" android:layout_marginBottom="10dp" android:layout_marginEnd="10dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginStart="10dp" android:layout_marginTop="10dp" android:layout_width="100dp"/>
</RelativeLayout>
</FrameLayout>
<TextView android:background="@color/design_default_color_primary_dark" android:id="@+id/nextsatacttextview" android:layout_alignTop="@id/grayoverlaytextview" android:layout_centerHorizontal="true" android:layout_height="125dp" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginTop="80dp" android:layout_width="match_parent"/>
<TextView android:id="@+id/hometitletextview" android:layout_centerHorizontal="true" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_width="wrap_content" android:text="Home" android:textColor="@color/hometitlecolor" android:textSize="20sp" tools:text="Home"/>
<TextView android:background="@color/accentcolorone" android:id="@+id/grayoverlaytextview" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_height="65dp" android:layout_margin="0dp" android:layout_width="match_parent"/>
<RelativeLayout android:layout_alignBottom="@+id/nextsatacttextview" android:layout_alignEnd="@+id/nextsatacttextview" android:layout_alignLeft="@+id/nextsatacttextview" android:layout_alignRight="@+id/nextsatacttextview" android:layout_alignStart="@+id/nextsatacttextview" android:layout_alignTop="@+id/nextsatacttextview" android:layout_height="100dp" android:layout_width="@id/nextsatacttextview">
<TextView android:id="@+id/upcomingtestlabel" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:layout_alignParentTop="true" android:layout_height="wrap_content" android:layout_margin="0dp" android:layout_width="wrap_content" android:text="Upcoming Test:" android:textColor="@color/common_google_signin_btn_text_dark_default" android:textSize="20sp"/>
<LinearLayout android:layout_below="@id/upcomingtestlabel" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginStart="20dp" android:layout_marginTop="20dp" android:layout_width="wrap_content" android:orientation="horizontal">
<TextView android:id="@+id/nextsatacttext" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="SAT: 03/09" android:textColor="@color/common_google_signin_btn_text_dark_default" android:textSize="40sp"/>
<RelativeLayout android:layout_gravity="bottom" android:layout_height="match_parent" android:layout_marginLeft="30dp" android:layout_marginStart="30dp" android:layout_width="match_parent">
<Button android:background="@drawable/signup" android:id="@+id/satlinkbutton" android:layout_gravity="center" android:layout_height="match_parent" android:layout_width="100dp" android:visibility="visible"/>
<Button android:background="@drawable/signup" android:id="@+id/actlinkbutton" android:layout_gravity="center" android:layout_height="match_parent" android:layout_width="100dp" android:visibility="visible"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>
<com.google.android.gms.ads.AdView ads:adSize="BANNER" ads:adUnitId="ca-app-pub-3940256099942544/6300978111" android:id="@+id/adView" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_height="wrap_content" android:layout_width="wrap_content" xmlns:ads="http://schemas.android.com/apk/res-auto"/>
</RelativeLayout>'
Upvotes: 6
Views: 38902
Reputation: 309
Check out this (it worked for me. I was having this error on a boilerplate "Hello World" My Application right out of the box before modifying it). https://www.google.com/search?q=Can%27t+determine+type+for+tag+%27%3Cmacro+name%3D%22m3_comp_bottom_app_bar_container_color%22%3E%3Fattr%2FshapeAppearance+Corner+mall&rlz=1C1SQJL_enUS783US783&oq=c&aqs=chrome.0.69i59l2j69i60l4j69i65l2.5223j0j7&sourceid=chrome&ie=UTF-8#fpstate=ive&vld=cid:4fe0d9cc,vid:Zlkj1COxKcM
Upvotes: 0
Reputation: 391
I also had the same issue. In my case there was a mismatch between gradle version and AGP dependency. Just run the AGP Upgrade Assistant from Tools menu.
Upvotes: 1
Reputation: 1220
Check file location. I had AndroidManifest.xml
misplaced in res/values
instead of root. Layouts have also special folder.
Upvotes: 0
Reputation: 733
This type of error is usually caused due to syntax issues. In your case there is one as well. There is an extra closing tag in the last line of your XML. Just remove </RelativeLayout>'
from last line and the error will be gone.
EDIT
As suggested by Mike in comments, if there are any additional tags in your XML please update your question and share them all.
Upvotes: 1