gpt4 book ai didi

java - 应用 list 中的属性缺少 Android 命名空间前缀

转载 作者:行者123 更新时间:2023-12-01 12:00:35 26 4
gpt4 key购买 nike

我正在为 Android 构建一个 N64 模拟器,一切都很顺利,直到我清理它并在我的 list 文件中收到大量错误。错误是:

Attribute is missing the Android namespace prefix

这是我的 list 文件的代码:

<?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"

最佳答案

您的 list 有点困惑。有时您会在 android:name= 后面加上 ="false",这没有任何意义。我的猜测是 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对于允许的属性。

关于java - 应用 list 中的属性缺少 Android 命名空间前缀,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28004992/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com