Android 找不到类com.joannazapata.pdfview.pdfview

Android 找不到类com.joannazapata.pdfview.pdfview,android,fragment,pdfview,Android,Fragment,Pdfview,我想在android中使用pdfview打开PDF。 这是我的布局代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientatio

我想在android中使用pdfview打开PDF。

这是我的布局代码:

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

<com.joanzapata.pdfview.PDFView
    android:id="@+id/infoinstalacion_fragment5_pdfview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
</LinearLayout>
这就是错误:

04-15 00:05:06.504:E/dalvikvm(16177):找不到从方法com.kirolm.instalacionesdp.info.InfoInstalacionFragment5.onCreateView引用的类“com.joannazapata.pdfview.pdfview”

04-15 00:05:06.514:E/AndroidRuntime(16177):android.view.InflateException:二进制XML文件行#6:对类com.joannazapata.pdfview.pdfview进行膨胀时出错

04-15 00:05:06.514:E/AndroidRuntime(16177):原因:java.lang.ClassNotFoundException:在路径:DexPathList[[zip文件”/data/app/com.kirolm.instalacionesdp-1.apk],NativelLibraryDirectory=[/data/app-lib/com.kirolm.instalacionesdp-1,/vendor/lib,/system/lib]上未找到类“com.pdfview”

有什么想法吗? 谢谢!

解决了

在Eclipse中添加支持库。在我的Android项目中


谢谢!

com.joannazapata.pdfview.pdfview
是充气视图吗?发布你的
build.gradle
。听起来你没有正确添加库。我想是的。按照开发人员的说明进行操作@我想这就是错误所在。但无论如何要解决它。如何添加库属性@加贝山!。在Eclipse中添加支持库。在我的Android项目中。感谢
        @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    View view = inflater.inflate(R.layout.infoinstalacion_fragment5, container, false);
    PDFView pdfView= (PDFView) view.findViewById(R.id.infoinstalacion_fragment5_pdfview);
    view.findViewById(R.id.infoinstalacion_fragment5_web_view);
    pdfView.fromAsset("horarios.pdf")
    .defaultPage(1)
    .showMinimap(false)
    .enableSwipe(true)
    .load();    
    return view;
}