Big*_*der 20 xml android manifest android-studio
我有一些关于某些属性的明显错误.我没有对应用程序自动生成的清单进行任何更改,但是我收到了一些错误.*(我使用的是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>
Run Code Online (Sandbox Code Playgroud)
- 对于xmlns:android属性我得到"URL未注册" - 对于android versionCode,versionName,allowBackup,label和theme我得到"属性不允许在这里"
我看了清单文档,找不到答案.例如,allowBackup属性的放置方式与文档指定的完全相同.
编辑:看了一下后我发现在android:theme"@ style/AppTheme"我得到一个没有资源匹配给定的名字.这是Gradle Build中唯一出现的内容.我已多次清理和重建项目.
小智 54
只需关闭清单文件并重新打开即可.它对我有用.
就我而言,关闭 AndroidManifest.xml 并选择 File > Invalidate Caches / Restart 解决了该问题。
不知道为什么我也必须做最后一步,但它为我整理了所有这些错误。
| 归档时间: |
|
| 查看次数: |
38977 次 |
| 最近记录: |