Riya
Riya

Reputation: 425

duplicate attribute error in android studio

I am making an app but getting an error which says R can't resolve. Can anyone help me to solve this problem ?

error: duplicate attribute. Message{kind=ERROR, text=error: duplicate attribute., sources=[/Users/Puja Dudhat/Library/Android/ForecastNEarthquake/app/src/main/res/layout/activity_main.xml:7], original message=, tool name=Optional.of(AAPT)}

Upvotes: 0

Views: 3198

Answers (2)

pooja jardosh
pooja jardosh

Reputation: 289

xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"

OR

Any imports are defined more than one in your xml file. Check it once.

Upvotes: 3

Riya
Riya

Reputation: 425

I just removed duplicate from xml file which was xmlns:tools="http://schemas.android.com/tools"

Upvotes: 4

Related Questions