我正在尝试实现这个库:https://github.com/commonsguy/cwac-camera
因此,在设置ActionBarSherlock (比10更旧的App所需的)之后,当我运行该应用程序时,它是在膨胀布局时崩溃的:
<?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>有以下错误:

这是我的库设置:

所有的东西都会编译,但是当我在布局中使用这个类时,它就崩溃了。
它是导入的,因为我可以在代码中使用该类:

有小费吗?
编辑:
这是我真正的安排。现在我不再使用Jar,而是使用源代码作为库项目,现在错误看起来像是AppCompat库与Sherlock和/或CameraFragment库不兼容:


第二版编辑。现在,我从项目中删除了ABS,并使用Appcompat为Commonsware相机项目。它编译,现在错误如下:
类不是视图com.commonsware.cwac.camera.acl.CameraFragment
发布于 2013-12-20 17:46:39
CameraFragment不是View,所以您不能这样使用它。要么使用<fragment>元素来使用片段,要么使用CameraView。
https://stackoverflow.com/questions/20707673
复制相似问题