2015-01-17 2 views
0

Я создаю эмулятор N64 для Android, все идет хорошо, пока я его не очищу и не получу тонны ошибок в файле манифеста. Ошибка:В атрибуте отсутствует префикс пространства имен Android в манифесте приложения

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" 
+1

Что вы имеете в виду, указав имя активности на «false»? Вы не можете этого сделать. Просто замените '=" false "' на закрытие '' '. – natario

ответ

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 для разрешенных атрибутов ,

Смежные вопросы