元素类型“清单”必须由匹配的结束标记“< / manifest>”终止。 [英] The element type "manifest" must be terminated by the matching end-tag "</manifest>".

查看:569
本文介绍了元素类型“清单”必须由匹配的结束标记“< / manifest>”终止。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在关注Hello World Code项目。



我收到以下错误消息:



Hi,
I am following the Hello World Code project.

I am getting following error message:

The element type "manifest" must be terminated by the matching end-tag "</manifest>".





我有以下代码





I have got following code

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloworldcodeproj">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" />
    <activity android:name=".MainActivity" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    </application>
</manifest>







另外:



我跟随教程不一致:




Also:

I have following inconsistent with the tutorial:

public class MainActivity extends Activity{
    @Override
    protected void onCreate(@androidx.annotation.Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }



有些正文请指导我如何删除此错误。



Zulfi



我尝试了什么:



我正在关注代码项目的教程。


Some body please guide me how to remove this error.

Zulfi

What I have tried:

I am following the code project's tutorial.

推荐答案

这与应用程序标签发生冲突,该标签关闭两次。



你有

This is a conflict with the tag "application" which is "closed twice".

You have
<application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" />  <<<<<closed tag application





及之后再次



and afterwards again

</application>





所以你需要做出决定。要么它应该是

1.)



So you need to take a decision. Either it should be
1.)

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloworldcodeproj">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
    <activity android:name=".MainActivity" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    </application>
</manifest>





2.)或



2.) or

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.helloworldcodeproj">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" />
    <activity android:name=".MainActivity" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</manifest>


这篇关于元素类型“清单”必须由匹配的结束标记“&lt; / manifest&gt;”终止。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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