问题描述
关于某些属性,我有一些明显的错误.我尚未对自动生成的应用程序的清单进行任何更改,但出现了一些错误. *(我正在使用Android Studio 1.2.2)
I have several manifest errors regarding some attributes . I have not made any changes to the manifest the application generated automatically yet i get several errors. *( I'm using Android Studio 1.2.2)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.iustinian.girlfriendsolver"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.iustinian.girlfriendsolver.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
-对于xmlns:android属性,我得到"URL未注册"-对于android versionCode,versionName,allowBackup,label和theme我得到此处不允许使用属性"
-For the xmlns:android attribute i get "URL not registered "-For android versionCode , versionName , allowBackup , label and theme I get "attribute not allowed here "
我看了清单文件,找不到答案.例如,allowBackup属性的放置与文档中指定的完全相同.
I took a look at the manifest documentation and couldn't find an answer . For example the allowBackup attribute is placed exactly like the documentation specifies .
环顾四周后,我发现在android:theme"@ style/AppTheme"处,我得到的资源与给定名称不匹配.这是Gradle Build中唯一显示的内容.我已经多次清理并重建了该项目.
after looking around some more I found that at android:theme "@style/AppTheme" I get a no resource matches the given name . This is the only thing that shows up in the Gradle Build . I have cleaned and rebuilt the project several times .
推荐答案
只需关闭清单文件并重新打开即可.它对我有用.
Just Close your manifest file and reopen it. It worked for me.
这篇关于此处不允许使用Android清单属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!