与元素类型“application”关联的属性“andriod:name”的前缀“andriod”未绑定?

时间:2015-01-31 10:52:00

标签: android eclipse attributes

我有一个名为G的课程,该课程从Application扩展而来,这是班级:

public class G extends Application {

public static Context ctx;
@Override
public void onCreate() {
    // TODO Auto-generated method stub
    super.onCreate();

    ctx = this.getApplicationContext();
  }  
 }

并且在AndroidManifest.xml我添加了这样的类:

<?xml version="1.0" encoding="utf-8"?>
<uses-sdk android:minSdkVersion="8" />

<application
    andriod:name=".G"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".DatabaseTestActivity"
        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>

但它给了我这个错误:The prefix "andriod" for attribute "andriod:name" associated with an element type "application" is not bound.

问题是什么?

编辑:这是我的AndroidManifest.XML

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="na.pe.database"
 android:versionCode="1"
 android:versionName="1.0" >

  <uses-sdk android:minSdkVersion="8" />

  <application
    andriod:name="na.pe.database.G"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".DatabaseTestActivity"
        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>

1 个答案:

答案 0 :(得分:2)

请注意,您的属性名称中存在拼写错误

andriod:name
    ^