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
.
ClassNotFoundException commonsware CameraFragment
-
20-09-2022 - |
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:
This is my library setup:
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:
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:
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
Lösung