简体   繁体   中英

How do I add a final newline in my manifest.xml in Android Studio

I get an error in my manifest.xml which I can't seem to solve. The error is:

Manifest file doesnt end with an final newline.

The error occures right before the last </application> .

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.matthias.w_seminar">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <activity android:name=".MainMenu"
            android:theme="@android:style/Theme.Holo.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
               </activity>
          <activity android:name=".Difficulty"
             android:theme="@android:style/Theme.Holo.NoActionBar"
              />
           <activity android:name=".GameNormal"
               android:theme="@android:style/Theme.Holo.NoActionBar"
              />

        </application>

</manifest>

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

Un-inject Language/Reference

You can also try to copy your manifest content, delete original manifest file and create new one like this :

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM