簡體   English   中英

如何在 Android Studio 的 manifest.xml 中添加最后的換行符

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

我的manifest.xml中出現錯誤,我似乎無法解決。 錯誤是:

Manifest file doesnt end with an final newline.

錯誤發生在最后一個</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>

單擊帶有紅線的單詞(導致上述錯誤),然后單擊 Alt+Enter 並選擇

Un-inject Language/Reference

您還可以嘗試復制清單內容,刪除原始清單文件並創建新的清單文件,如下所示:

在此處輸入圖片說明

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM