java - Android OpenCV : No resource identifier found for attribute 'camera_id' in package -
i have opencv , android set in eclipse. following 1 of 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 attribute 'show_fps' in package no resource identifier found attribute 'camera_id' in package
please add following resource file in 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>
Comments
Post a Comment