2017-10-20 27 views
-1

このマニフェストは何ですか? 私はアンドロイドのスタジオを使用しています2.3 **エラー:例外供給マニフェストファイルCを解析中に:\ユーザーは\馬力\ AndroidStudioProjects \ Two_Screens \アプリ\ SRC \メイン\ AndroidManifest.xmlをエレメントタイプ "application"は、一致する終了タグ "</ application>"で終わらなければなりません。

The element type "application" must be terminated by the matching end-tag "".**

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

<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="com.example.hp.two_screens.MainActivity"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity android:name="com.example.hp.two_screens.SecondActivity" /> 
    </activity> 
</application> 
+6

第2の「」要素の開始タグは自己閉鎖されています。つまり、 '/'を最後から削除するか、次の行で ''を削除してください。 –

答えて

3

SecondActivityタグはすでに閉じられています(/>によって終了します)。したがって、余分な</activity>タグのために、不正な形式のマニフェストXMLファイルがあります。そのタグを削除して問題を解決します。

<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="com.example.hp.two_screens.MainActivity"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 

    <activity android:name="com.example.hp.two_screens.SecondActivity" /> 

    //</activity> remove this closure!! 

</application> 
+0

ありがとう@Alex Ta – Auodumber

関連する問題