RecyclerView ClassNotFound
RecyclerView ClassNotFound
我尝试将RecyclerView和CardView添加到我的项目中
dependencies { compile 'com.android.support:appcompat-v7:21.0.0' compile 'com.android.support:support-v13:21.0.0' compile 'com.android.support:cardview-v7:21.0.0' compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.viewpagerindicator:library:2.4.1@aar' compile project(':facebook') }
虽然编译成功,但在设备上运行时出现了以下异常
Caused by: java.lang.ClassNotFoundException: 在路径上未找到类"android.view.RecyclerView":DexPathList[[zip file "/data/app/xxxx.apk"],nativeLibraryDirectories=[/data/app-lib/xxxx, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:497) at java.lang.ClassLoader.loadClass(ClassLoader.java:457) at android.view.LayoutInflater.createView(LayoutInflater.java:559) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:652)