[英]Attribute is missing the Android namespace prefix in app manifest
I am building a N64 emulator for android, all is going well until I clean it and get a ton of errors in my manifest file. 我正在为Android开发一个N64模拟器,在我清理它并在清单文件中发现大量错误之前,一切都进行得很好。 The error is:
错误是:
Attribute is missing the Android namespace prefix
Here is the code for my manifest file: 这是清单文件的代码:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bytecode.v3.alpha"
android:installLocation="auto"
android:versionCode="37"
android:versionName="3.a.0 (debug)" >
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:name="com.bytecode.n64emu4droid.AppMupen64Plus"
android:allowBackup="true"
android:isGame="true"
android:hardwareAccelerated="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/appTheme" >
<activity
android:name="com.bytecode.n64emu4droid.SplashActivity"
android:label="@string/SplashActivity_title"
android:theme="@style/appTheme.Black" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="tv.ouya.intent.category.GAME" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="*" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.n64" />
<data android:pathPattern=".*\\.N64" />
<data android:pathPattern=".*\\.v64" />
<data android:pathPattern=".*\\.V64" />
<data android:pathPattern=".*\\.z64" />
<data android:pathPattern=".*\\.Z64" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.GalleryActivity"
android:exported="false"
android:label="@string/GalleryActivity_title"
android:launchMode="singleTask" >
</activity>
<activity
android:name="com.bytecode.n64emu4droid.PlayMenuActivity"
android:exported="false"
android:label="@string/PlayMenuActivity_title" >
<intent-filter>
<action android:name=".PlayMenuActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.SettingsGlobalActivity"
android:exported="false"
android:label="@string/SettingsGlobalActivity_title" >
<intent-filter>
<action android:name=".SettingsGlobalActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.profile.ManageControllerProfilesActivity="false"
android:label="@string/ManageControllerProfilesActivity_title" >
<intent-filter>
<action android:name=".profile.ManageControllerProfilesActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.profile.ControllerProfileActivity="false"
android:label="@string/ControllerProfileActivity_title" >
<intent-filter>
<action android:name=".profile.ControllerProfileActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.profile.ManageEmulationProfilesActivity="false"
android:label="@string/ManageEmulationProfilesActivity_title" >
<intent-filter>
<action android:name=".profile.ManageEmulationProfilesActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.profile.EmulationProfileActivity="false"
android:label="@string/EmulationProfileActivity_title" >
<intent-filter>
<action android:name=".profile.EmulationProfileActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.profile.ManageTouchscreenProfilesActivity="false"
android:label="@string/ManageTouchscreenProfilesActivity_title" >
<intent-filter>
<action android:name=".profile.ManageTouchscreenProfilesActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.profile.TouchscreenProfileActivity="false"
android:label="@string/TouchscreenProfileActivity_title" >
<intent-filter>
<action android:name=".profile.TouchscreenProfileActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.input.DiagnosticActivity="false"
android:label="@string/DiagnosticActivity_title" >
<intent-filter>
<action android:name=".input.DiagnosticActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.bytecode.n64emu4droid.cheat.CheatEditorActivityanges="keyboardHidden|orientation|screenSize"
android:label="@string/CheatEditorActivity_title" >
<intent-filter>
<action android:name=".cheat.CheatEditorActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!--
For the GameActivities, do not restart the activity when the phone's slider
opens or closes, or when the orientation (and thereby screen size) changes.
This behavior is specified in android:configChanges below.
-->
<activity
android:name="com.bytecode.n64emu4droid.GameActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/GameActivity_title"
android:theme="@style/appTheme.Black" >
</activity>
<activity
android:name="com.bytecode.n64emu4droid.GameActivityXperiaPlay"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/GameActivity_title"
android:theme="@style/appTheme.Black" >
<meta-data
android:name="android.app.lib_name"
android:value="xperia-touchpad" />
</activity>
<meta-data
android:name="xperiaplayoptimized_content"
android:resource="@drawable/hireslogo" />
<meta-data
android:name="game_display_name"
android:resource="@string/app_name" />
<meta-data
android:name="game_icon"
android:resource="@drawable/hireslogo" />
</application>
The error occurs at more then one location. 错误发生在一个以上的位置。 Of them is:
其中有:
android:name="com.bytecode.n64emu4droid.profile.ControllerProfileActivity="false"
Your manifest is slightly messed up. 您的清单有些混乱。 Sometimes you have
android:name=
followed by ="false"
, which does not mean anything. 有时您有
android:name=
后跟="false"
,这并不意味着什么。 My guess is that that false was referred to a android:exported
attribute that somehow got lost. 我的猜测是,该false指的是
android:exported
属性,该属性以某种方式丢失了。
So you should have: 因此,您应该具有:
android:name="name"
android:exported="false"
In a similar way, you have: 以类似的方式,您可以:
android:name="com.bytecode.n64emu4droid.cheat.CheatEditorActivityanges="keyboardHidden|orientation|screenSize"
but I think that should be: 但我认为应该是:
android:name="package.CheatEditorActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.