【发布时间】:2016-04-20 14:37:11
【问题描述】:
layout.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="prajjwal.app.myfreight.MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
由于某种原因,我收到了 java.lang.NullPointerException。我刚刚将我的 SDK 版本更新到 24.4.1,在 Eclipse Mars.2 上使用 Android 6.0(API 级别 23)。
我该如何解决这个问题?
【问题讨论】:
-
请提供您的 Layout xml 文件!
-
它说找不到特定的类。我确定它在我的计算机中,我该如何“修复构建路径”?
-
你没有关闭你的
标签吗?
标签: android android-layout nullpointerexception adt