Frage

I'm trying to implement this library: https://github.com/commonsguy/cwac-camera

So after setting up ActionBarSherlock (needed for older APIS than 10), when I run the App it's crashing while inflating the layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <com.commonsware.cwac.camera.acl.CameraFragment
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

</RelativeLayout>

with the following error:

enter image description here

This is my library setup:

enter image description here

Everything compiles but as soon as I'm using this class in layout, it's crashing.

It's imported because I can use that class in code:

enter image description here

Any tips?

Edit:

This is my actual setup. Instead of using Jar, I'm now using sourcecode as library project, now the error looks like AppCompat library is incompatible with Sherlock and/or CameraFragment library:

enter image description here

enter image description here

2nd EDIT. Now, I removed ABS from the project and used Appcompat for Commonsware Camera Project. It compiles, and the error is now the following:

Class is not a View com.commonsware.cwac.camera.acl.CameraFragment

War es hilfreich?

Lösung

CameraFragment is not a View, and so you cannot use it as such. Either use a <fragment> element to use the fragment, or use CameraView.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top