當我嘗試生成APK時,它在我的AndroidManifest.xml中出現此錯誤。它說,Android Studio - 」<activity>元素必須是<application>元素的直接子元素[WrongManifestParent]「
Error:(6) Error: The <activity> element must be a direct child of the <application> element [WrongManifestParent]
我該如何解決這個問題?
我的AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.apps.stephenshettler.laughsoundboard">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|sc reenSize|smallestScreenSize"
android:theme="@android:style/Theme.Translucent" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
你解決這個問題我做的所有活動的應用程序標記的直接孩子,因爲錯誤說...投票關閉爲錯字 –