Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 293
user3672793 Avatar asked May 25 '14 01:05

user3672793


People also ask

What is the Android manifest file Why do you need this?

Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.

How do I declare a service in manifest Android?

You declare a service in your app's Manifest, by adding a <service> element as a child of your <application> element. There's a list of attributes that you can use to control a service's behavior, but as a minimum you'll need to provide the service's name (android:name) and a description (android:description).


1 Answers

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

like image 87
Shmarkus Avatar answered Oct 21 '22 16:10

Shmarkus