必须通过匹配结束标记来终止清单

时间:2011-08-28 16:35:50

标签: android xml eclipse

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="hattrixz.fiz"
    android:versionCode="1"
    android:versionName="1.0">
  <uses-sdk android:minSdkVersion="8" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
  <application android:icon="@drawable/icon" android:label="@string/app_name"/>
  <activity android:name=".VirtualTimeClockActivity"
      android:label="@string/app_name">
    <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
  </activity>
</manifest>

不用说错误不会让我调试。

所以任何帮助都将不胜感激

我也得到错误“R”无法解决.java

package hattrixz.fiz;
import android.app.Activity;
import android.os.Bundle;

public class VirtualTimeClockActivity extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
  }
}

1 个答案:

答案 0 :(得分:1)

您在manifest.xml中缺少结束应用程序标记。它应该是:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="hattrixz.fiz"
    android:versionCode="1"
    android:versionName="1.0">
  <uses-sdk android:minSdkVersion="8" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
  <application android:icon="@drawable/icon" android:label="@string/app_name"/>
  <activity android:name=".VirtualTimeClockActivity"
      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>