[英]AAPT: error: unexpected element <intent-filter> found in <manifest><application> after upgrading to android 3.1
[英]How can I solve error: unexpected element <intent-filter> found in <manifest><application>
我的 Android Manifest.xml 有一個錯誤我不知道我修改了什么。 我想用主題 Theme.NoActionBar 制作主要活動,但有些東西已經被取消配置。 它拋出以下錯誤:在..中找到意外元素
這是我的 android 清單。xml 文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dogsgame"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="30" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<supports-gl-texture android:name="GL_OES_compressed_ETC1_RGB8_texture" />
<supports-gl-texture android:name="GL_OES_compressed_paletted_texture" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:theme="@style/Theme.Dogsgame" >
<activity android:name="com.example.dogsgame.shop" />
<activity
android:name="com.example.dogsgame.backdog"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.example.dogsgame.dogoutside"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.example.dogsgame.dog"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.example.dogsgame.choosedogs"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.example.dogsgame.secondactivity"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<activity
android:name="com.example.dogsgame.MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</application>
你應該像這樣改變它
...
<activity
android:name="com.example.dogsgame.MainActivity"
android:theme="@style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.