Question: I'm trying to make my app run in landscape mode only, but for some reason I'm getting this very weird error and I have no idea why.

```
<?xml version="1.0" encoding="utf-8"?>
 <manifest
    xmlns:android="http://schemas.android.com/apk/res/android"  
    package="WineLab.WineLab" android:versionCode="1"  android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" />
 <application android:allowBackup="true" android:label="@string/app_name"></application>
  <activity android:name="WineLab"
 android:screenOrientation="landscape"
 android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
 </activity>
</manifest>

```

![Screenshot](https://i.stack.imgur.com/7mQo6.png)

The above 'manifest' is underlined in blue and that's it. The error just says that the "manifest" element is not declared.

Answer: 
Check you have declared your `</activity>` tag outside the `<application`

Try this

```
<?xml version="1.0" encoding="utf-8"?>
 <manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="WineLab.WineLab" android:versionCode="1"  android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" />
 <application android:allowBackup="true" android:label="@string/app_name">
  <activity android:name=".WineLab"
 android:screenOrientation="landscape"
 android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
       <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
 </activity>

</application>
</manifest>

```

**NOTE** : also need to add `<intent-filter>` in your activity
I managed to get my program running without fixing the manifest error - I deleted all of that code from the AndroidManifest and forgot about it. Thank you for the help.