我正在编写一个计算器应用程序来熟悉ADK,但我的项目不会构建。没有生成R.java
,当我点击构建时,我收到以下消息:
Errors occurred during the build.
Errors running builder 'Android Pre Compiler' on project 'JakobCalculator'.
java.lang.NullPointerException
我不使用subversion,因此所有指向它的These questions都没有帮助我。
Eclipse控制台显示以下文本:
[2013-04-20 10:42:54 - JakobCalculator] Android Launch!
[2013-04-20 10:42:54 - JakobCalculator] adb is running normally.
[2013-04-20 10:42:54 - JakobCalculator] Performing edu.us.jweisblat14.calculator.MainActivity activity launch
[2013-04-20 10:42:54 - JakobCalculator] Automatic Target Mode: using device '015d43637e60021b'
[2013-04-20 10:42:54 - JakobCalculator] Uploading JakobCalculator.apk onto device '015d43637e60021b'
[2013-04-20 10:42:54 - JakobCalculator] Installing JakobCalculator.apk...
[2013-04-20 10:42:57 - JakobCalculator] Success!
[2013-04-20 10:42:57 - JakobCalculator] Starting activity edu.us.jweisblat14.calculator.MainActivity on device 015d43637e60021b
[2013-04-20 10:42:57 - JakobCalculator] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=edu.us.jweisblat14.calculator/.MainActivity }
[2013-04-20 10:49:08 - JakobCalculator] Error in an XML file: aborting build.
我无法弄清楚XML错误可能是什么。 我能找到的唯一黄色警告是:
EditText
xml中的MainActivity
元素上(没有标签视图指向它们)我在哪里可以找到错误?
编辑:这是我的清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.us.jweisblat14.calculator"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="edu.us.jweisblat14.calculator.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>