安装后,我的应用程序无法启动,它立即崩溃,并且我无法理解该错误!
i have created two recylcerVIEw for two fragments which are attached in the main activity xml file
错误:
E/AndroIDRuntime: FATAL EXCEPTION: main Process: com.invincible.fragfrag, PID: 14384 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.invincible.fragfrag/com.invincible.fragfrag.MainActivity}: androID.vIEw.InflateException: Binary XML file line #14: Error inflating class androID.support.v7.app.AlertController.RecycleListVIEw at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2521) at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601) at androID.app.ActivityThread.access0(ActivityThread.java:178) at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) at androID.os.Handler.dispatchMessage(Handler.java:111) at androID.os.Looper.loop(Looper.java:194) at androID.app.ActivityThread.main(ActivityThread.java:5637) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: androID.vIEw.InflateException: Binary XML file line #14: Error inflating class androID.support.v7.app.AlertController.RecycleListVIEw at androID.vIEw.LayoutInflater.createVIEwFromTag(LayoutInflater.java:757) at androID.vIEw.LayoutInflater.rInflate(LayoutInflater.java:806) at androID.vIEw.LayoutInflater.inflate(LayoutInflater.java:504) at androID.vIEw.LayoutInflater.inflate(LayoutInflater.java:414) at androID.vIEw.LayoutInflater.inflate(LayoutInflater.java:365) at androID.support.v7.app.AppCompatDelegateImplV9.setContentVIEw(AppCompatDelegateImplV9.java:288) at androID.support.v7.app.AppCompatActivity.setContentVIEw(AppCompatActivity.java:143) at com.invincible.fragfrag.MainActivity.onCreate(MainActivity.java:13) at androID.app.Activity.performCreate(Activity.java:6100) at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2468) at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601) at androID.app.ActivityThread.access0(ActivityThread.java:178) at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) at androID.os.Handler.dispatchMessage(Handler.java:111) at androID.os.Looper.loop(Looper.java:194) at androID.app.ActivityThread.main(ActivityThread.java:5637) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:755) Caused by: java.lang.classNotFoundException: DIDn't find class "androID.support.v7.app.AlertController.RecycleListVIEw" on path: DexPathList[[zip file "/data/app/com.invincible.fragfrag-1/base.apk"],nativelibraryDirectorIEs=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.classLoader.loadClass(ClassLoader.java:511) at java.lang.classLoader.loadClass(ClassLoader.java:469) at androID.vIEw.LayoutInflater.createVIEw(LayoutInflater.java:571) at androID.vIEw.LayoutInflater.createVIEwFromTag(LayoutInflater.java:743) at androID.vIEw.LayoutInflater.rInflate(LayoutInflater.java:806) at androID.vIEw.LayoutInflater.inflate(LayoutInflater.java:504) at androID.vIEw.LayoutInflater.inflate(LayoutInflater.java:414) at androID.vIEw.LayoutInflater.inflate(LayoutInflater.java:365) at androID.support.v7.app.AppCompatDelegateImplV9.setContentVIEw(AppCompatDelegateImplV9.java:288) at androID.support.v7.app.AppCompatActivity.setContentVIEw(AppCompatActivity.java:143) at com.invincible.fragfrag.MainActivity.onCreate(MainActivity.java:13) at androID.app.Activity.performCreate(Activity.java:6100) at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2468) at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2601) at androID.app.ActivityThread.access0(ActivityThread.java:178) at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) at androID.os.Handler.dispatchMessage(Handler.java:111) at androID.os.Looper.loop(Looper.java:194) at androID.app.ActivityThread.main(ActivityThread.java:5637) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:755) Suppressed: java.lang.classNotFoundException: DIDn't find class "androID.support.v7.app.AlertController.RecycleListVIEw" on path:
主要活动:
package com.invincible.fragfrag;import androID.support.v4.app.FragmentManager;import androID.support.v4.app.FragmentTransaction;import androID.support.v7.app.AppCompatActivity;import androID.os.Bundle;public class MainActivity extends AppCompatActivity { @OverrIDe protected voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVIEw(R.layout.activity_main); FragmentManager fragmentManager = getSupportFragmentManager(); if (fragmentManager.findFragmentByID(R.ID.table_number_List) == null) { tableNumber tableNumber=tableNumber.gettableNumber("number"); FragmentTransaction transaction =fragmentManager.beginTransaction(); transaction.add(R.ID.table_number_List,tableNumber); transaction.commit(); } if (fragmentManager.findFragmentByID(R.ID.table_values) == null) { tableValue tableValue=tableValue.gettableValue("value"); FragmentTransaction transaction =fragmentManager.beginTransaction(); transaction.add(R.ID.table_values,tableValue); transaction.commit(); } } @OverrIDe protected voID onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); }}
主要xml文件:
<?xml version="1.0" enCoding="utf-8"?><linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID" xmlns:tools="http://schemas.androID.com/tools" androID:ID="@+ID/activity_main" androID:layout_wIDth="match_parent" androID:layout_height="match_parent" androID:paddingBottom="@dimen/activity_vertical_margin" androID:paddingleft="@dimen/activity_horizontal_margin" androID:orIEntation="vertical" androID:paddingRight="@dimen/activity_horizontal_margin" androID:paddingtop="@dimen/activity_vertical_margin" tools:context="com.invincible.fragfrag.MainActivity"> <androID.support.v7.app.AlertController.RecycleListVIEw androID:ID="@+ID/recycler_vIEw_one" androID:layout_weight="1" androID:layout_wIDth="match_parent" androID:layout_height="0dp"> </androID.support.v7.app.AlertController.RecycleListVIEw> <androID.support.v7.app.AlertController.RecycleListVIEw androID:layout_margintop="5dp" androID:ID="@+ID/recycler_vIEw_two" androID:layout_weight="1" androID:layout_wIDth="match_parent" androID:layout_height="0dp"> </androID.support.v7.app.AlertController.RecycleListVIEw></linearLayout>
请帮助我找出错误所在,以及在一个活动中如何使用两个recyclervIEw处理两个片段.
谢谢你的关心!
解决方法:
androID.support.v7.Widget.RecyclerVIEw
使用此代码在xml文件中创建一个列表视图.简单!
总结以上是内存溢出为你收集整理的膨胀类android.support.v7.app.AlertController.RecycleListView时出错全部内容,希望文章能够帮你解决膨胀类android.support.v7.app.AlertController.RecycleListView时出错所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)