I have OpenCV and Android set up in my Eclipse. The following is one of my layout files:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:opencv="http://schemas.android.com/apk/res-auto"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >
    <org.opencv.android.JavaCameraView
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:visibility="gone"
        android:id="@+id/hello"
        opencv:show_fps="true"
        opencv:camera_id="any" />
</LinearLayout>
The Eclipse compiler complains about:
No resource identifier found for attribute 'show_fps' in package 
No resource identifier found for attribute 'camera_id' in package 
                Please add following resource file in your project's values directory :
attrs.xml
with following content :
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name = "CameraBridgeViewBase" >
       <attr name="show_fps" format="boolean"/>
       <attr name="camera_id" format="integer" >
          <enum name="any" value="-1" />
          <enum name="back" value="0" />
          <enum name="front" value="1" />
       </attr>
    </declare-styleable>
</resources>
                        The two previously given answers to this question, in my opinion, are bandaids to the actual problem. When I encountered this error message, I needed to change some project properties.

If the OpenCV library is not present or has a red X next to it, you need to fix the Library dependency. To do this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With