Android Manifest Error Manifest file doesn't end with a final newline

android, android-studio

Solution

Click on the word with the red line (that causes the mentioned error) Click Alt+Enter and choose

`Un-inject Language/Reference`

That's it! At least this worked for me on the same error

Problem

Error: Manifest file doesn't end with a final newline... Checks whether a manifest file ends with a final newline (as required by JAR specifications) Expected ":" Here's the AndroidManifest ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapplication2.app" > <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.myapplication2.app.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> ``` It shows on the android.intent.action.MAIN line, underlined in red...Android Studio - which it says is the latest version when I click check for updates. It started to show on a project that had a perfectly working manifest file. After failed results from researching the error, I made a new project - all defaults - latest version - and did File->Invalidate Caches and Restart (one suggestion I found) but still the same error. Any ideas, am I missing a setting, etc... thx

Original source