Android的命名空间缺失 [英] Android Namespace Missing
本文介绍了Android的命名空间缺失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的Android清单下面,我得到一个错误与以下内容:
<使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAGE>
< GID组=media_rw/>
< /使用许可权>
这是说属性缺少的Android命名空间preFIX
前完全相同的文件,我修改了它工作得很好。
我完全清单是如下:
<?XML版本=1.0编码=UTF-8&GT?;
<清单的xmlns:机器人=http://schemas.android.com/apk/res/android
包=com.example.test12
安卓版code =1
机器人:=的versionName1.0>
!< - 使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAGE>< /使用许可权 - >
<使用许可权的android:NAME =android.permission.WAKE_LOCK>< /使用许可权>
<使用许可权的android:NAME =android.permission.INTERNET对>< /使用许可权>
<使用许可权的android:NAME =android.permission.ACCESS_NETWORK_STATE>< /使用许可权>
<使用许可权的android:NAME =android.permission.ACCESS_WIFI_STATE>< /使用许可权>
<使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAGE>
< GID组=media_rw/>
< /使用许可权> <用途-SDK
安卓的minSdkVersion =10
机器人:targetSdkVersion =10/> <应用
机器人:allowBackup =真
机器人:图标=@绘制/ ic_launcher
机器人:标签=@字符串/ APP_NAME
机器人:主题=@风格/ AppTheme>
<活动
机器人:名字=com.example.test12.MainActivity
机器人:标签=@字符串/ APP_NAME
机器人:screenOrientation =肖像>
&所述;意图滤光器>
<作用机器人:名字=android.intent.action.MAIN/>
<类机器人:名字=android.intent.category.LAUNCHER/>
&所述; /意图滤光器>
< /活性GT;
<活动机器人:TestityTestNAME =机器人:screenOrientation =肖像/>
< /用途>
<应用机器人:名字=GlobalObjects机器人:标签=@字符串/ APP_NAME/>
< /清单>
解决方案
原来,我不得不打开另一个在编辑器中保存文件,然后清洁并重新构建项目。我不知道为什么是这样的。
I have the following in my Android manifest and I am getting an error with the following:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">
<group gid="media_rw" />
</uses-permission>
It is saying "Attribute is missing the Android namespace prefix" The exact same file before I modified it was working just fine. My full manifest is below:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test12"
android:versionCode="1"
android:versionName="1.0" >
<!-- uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission-->
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE">
<group gid="media_rw" />
</uses-permission>
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="10" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.test12.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TestityTest" android:screenOrientation="portrait" />
</application>
<application android:name="GlobalObjects" android:label="@string/app_name" />
</manifest>
解决方案
It turns out that I had to open the file in another editor save it and then clean and build the project again. I have no idea why it was the case.
这篇关于Android的命名空间缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文