我有一个名为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>
答案 0 :(得分:2)
请注意,您的属性名称中存在拼写错误
andriod:name
^