【问题标题】:My application is crashed after i configure in other pc我在其他电脑上配置后我的应用程序崩溃了
【发布时间】:2014-04-26 20:15:38
【问题描述】:

当我在其他计算机上配置我的应用程序时,应用程序崩溃了。检查我的日志猫。我还添加了 android-v4-support.jar。

04-26 11:39:54.695: E/AndroidRuntime(4304): java.lang.RuntimeException:无法启动活动 组件信息{com.rockers.airtasker/com.rockers.airtasker.ProjectHome}: android.view.InflateException:二进制 XML 文件第 19 行:错误 膨胀类 android.support.v4.widget.DrawerLayout

<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="match_parent">

<!-- As the main content view, the view below consumes the entire
     space available using match_parent in both dimensions. -->
<FrameLayout
    android:id="@+id/content_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >
</FrameLayout>

<!-- android:layout_gravity="start" tells DrawerLayout to treat
     this as a sliding drawer on the left side for left-to-right
     languages and on the right side for right-to-left languages.
     The drawer is given a fixed width in dp and extends the full height of
     the container. A solid background is used for contrast
     with the content view. -->
<ListView
    android:id="@+id/left_drawer"
    android:layout_width="200dp"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:choiceMode="singleChoice"
    android:divider="@android:color/transparent"
    android:dividerHeight="0dp"
    android:background="#111"/>
</android.support.v4.widget.DrawerLayout>

【问题讨论】:

  • 分享您拥有的 xml 布局作为您的 ProjectHome 活动的内容视图。 logcat 说问题出在它的第 19 行。
  • 请检查我是否添加了 xml 文件
  • 终于花了半天时间解决了。我已经为导航抽屉添加了andoid-v13-support.jar,忘记按顺序检查并导出。

标签: android eclipse


【解决方案1】:

您是否添加了它的最新版本?众所周知,如果在错误的版本/依赖项中使用 v4 支持库会导致问题。

【讨论】:

    猜你喜欢
    • 2022-10-25
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 2023-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多