0

In every single one of my projects I have an error in res-value-styles.

I imported a shortcut to a picture in my drawables and now I dont have an R file and I get an error on every line. I have done corrections i have seen online to minimize the errors in the res folder. (Changing values in the 3 values folders) Now my only error in the res folder is with my main.xml. Here it is below. Keep in mind that I have just started a new project so all this code was given.

<menu 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"
    tools:context="com.quigg.muffin2.MainActivity" >

    <item
        android:id="@+id/action_settings"
        android:orderInCategory="100"
        android:title="@string/action_settings"
        app:showAsAction="never"/>

</menu>

I have an error to the left of item that says "error: No resource identifier found for attribute 'showAsAction' in package".

Anybody know what this error means and or how to fix this?

Gregor Thomas
  • 136,190
  • 20
  • 167
  • 294
bill
  • 1
  • 2

1 Answers1

0

You do not need a custom attributes in your XML.

Remove the lines

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

and change the line

app:showAsAction="never"

to

android:showAsAction="never"

Defining custom attrs

Community
  • 1
  • 1
Lesther Vega
  • 528
  • 3
  • 14