android.support.v7.widget.,关于android.support.v7.widget.RecyclerView的使用,总是找不到类...
各位高手求指导决,卡在这了,整了一个上午没搞定。log输出:06-1300:42:03.395:E/AndroidRuntime(1884):FATALEXCEPTION:main06-1300:42:03.395:E/AndroidRuntime(1884):java.lang.RuntimeException:UnabletostartactivityComponen...
各位高手求指导决,卡在这了,整了一个上午没搞定。
log输出:
06-13 00:42:03.395: E/AndroidRuntime(1884): FATAL EXCEPTION: main
06-13 00:42:03.395: E/AndroidRuntime(1884): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Weizhi.KaiCang/com.KaiCang.common.CommActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class android.support.v7.widget.RecyclerView
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.ActivityThread.access$600(ActivityThread.java:141)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.os.Handler.dispatchMessage(Handler.java:99)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.os.Looper.loop(Looper.java:137)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.ActivityThread.main(ActivityThread.java:5103)
06-13 00:42:03.395: E/AndroidRuntime(1884): at java.lang.reflect.Method.invokeNative(Native Method)
06-13 00:42:03.395: E/AndroidRuntime(1884): at java.lang.reflect.Method.invoke(Method.java:525)
06-13 00:42:03.395: E/AndroidRuntime(1884): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
06-13 00:42:03.395: E/AndroidRuntime(1884): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
06-13 00:42:03.395: E/AndroidRuntime(1884): at dalvik.system.NativeStart.main(Native Method)
06-13 00:42:03.395: E/AndroidRuntime(1884): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class android.support.v7.widget.RecyclerView
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
06-13 00:42:03.395: E/AndroidRuntime(1884): at com.KaiCang.chat.ChatFragment.onCreateView(ChatFragment.java:119)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.mysupport.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:963)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.mysupport.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1201)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.mysupport.v4.app.BackStackRecord.run(BackStackRecord.java:671)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.mysupport.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.mysupport.v4.app.MyFragmentActivity.onStart(MyFragmentActivity.java:552)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.Activity.performStart(Activity.java:5143)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
06-13 00:42:03.395: E/AndroidRuntime(1884): … 11 more
06-13 00:42:03.395: E/AndroidRuntime(1884): Caused by: java.lang.ClassNotFoundException: Didn”t find class “android.support.v7.widget.RecyclerView” on path: DexPathList[[zip file “/data/app/com.Weizhi.KaiCang-1.apk”],nativeLibraryDirectories=[/data/app-lib/com.Weizhi.KaiCang-1, /system/lib]]
06-13 00:42:03.395: E/AndroidRuntime(1884): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
06-13 00:42:03.395: E/AndroidRuntime(1884): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
06-13 00:42:03.395: E/AndroidRuntime(1884): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.view.LayoutInflater.createView(LayoutInflater.java:559)
06-13 00:42:03.395: E/AndroidRuntime(1884): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
06-13 00:42:03.395: E/AndroidRuntime(1884): … 23 more
xml文件:
xmlns:tools=”http://schemas.android.com/tools”
android:layout_width=”match_parent”
android:layout_height=”match_parent”
android:orientation=”vertical” >
android:layout_width=”fill_parent”
android:layout_height=”@dimen/kd__size150″
android:scaleType=”fitXY”
android:src=”@drawable/movie” />
android:id=”@+id/messages”
android:layout_width=”match_parent”
android:layout_height=”0dp”
android:layout_weight=”1″
android:paddingLeft=”@dimen/kd_linespace15″
android:paddingRight=”@dimen/kd_linespace15″ />
android:layout_width=”match_parent”
android:layout_height=”wrap_content”
android:gravity=”center_vertical”
android:orientation=”horizontal”
android:paddingLeft=”@dimen/kd_linespace15″
android:paddingRight=”@dimen/kd_linespace15″ >
android:id=”@+id/message_input”
android:layout_width=”0dp”
android:layout_height=”wrap_content”
android:layout_weight=”1″
android:hint=”@string/prompt_message”
android:imeActionId=”@+id/send”
android:imeActionLabel=”@string/action_send”
android:imeOptions=”actionSend”
android:inputType=”text”
android:maxLines=”1″
android:singleLine=”true” />
android:id=”@+id/send_button”
android:layout_width=”wrap_content”
android:layout_height=”wrap_content”
android:contentDescription=”@string/action_send”
android:src=”@android:drawable/ic_menu_send” />
解决方案
更多推荐
所有评论(0)