Android 清单错误清单文件不以最终换行符结尾 [英] Android Manifest Error Manifest file doesn't end with a final newline

查看:47
本文介绍了Android 清单错误清单文件不以最终换行符结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:

清单文件不以最后的换行符结尾...

Manifest file doesn't end with a final newline...

检查清单文件是否以最后的换行符结尾(根据 JAR 规范的要求)

Checks whether a manifest file ends with a final newline (as required by JAR specifications)

预期的:"

这是 AndroidManifest

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>

它显示在 android.intent.action.MAIN 行上,用红色下划线...Android Studio - 当我点击检查更新时,它说这是最新版本.

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.

它开始出现在一个具有完美工作清单文件的项目上.在研究错误的结果失败后,我创建了一个新项目 - 所有默认值 - 最新版本 - 并执行 File->Invalidate Caches and Restart(我发现的一个建议)但仍然出现相同的错误.

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

推荐答案

点击带有红线的单词(导致上述错误)单击 Alt+Enter 并选择

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

取消注入语言/参考

就是这样!至少这对我有同样的错误

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

这篇关于Android 清单错误清单文件不以最终换行符结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆