我正在为Android构建一个N64模拟器,一切顺利,直到我清理它并在我的清单文件中收到大量错误。错误是:
Attribute is missing the Android namespace prefix
以下是我的清单文件的代码:
<?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>
错误发生在多个位置。其中包括:
android:name="com.bytecode.n64emu4droid.profile.ControllerProfileActivity="false"
答案 0 :(得分:1)
你的清单有些混乱。
有时您android:name=
后跟="false"
,这并不意味着什么。
我的猜测是,这个错误被称为android:exported
属性,不知何故丢失了。
所以你应该:
android:name="name"
android:exported="false"
以类似的方式,你有:
android:name="com.bytecode.n64emu4droid.cheat.CheatEditorActivityanges="keyboardHidden|orientation|screenSize"
但我认为应该是:
android:name="package.CheatEditorActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
有关允许的属性,请参阅here。