当我在其他计算机上配置我的应用程序时,应用程序崩溃了。检查我的log-cat。我还添加了 机器人-V4-support.jar。
04-26 11:39:54.695:E / AndroidRuntime(4304): java.lang.RuntimeException:无法启动活动 ComponentInfo {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>
答案 0 :(得分:0)
您是否添加了最新版本?如果在错误的版本/依赖项中使用,v4支持库很有名。