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

查看:190
本文介绍了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

Un-inject Language/Reference

就是这样!至少这对我解决了相同的错误

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

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

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