2017-10-20 4 views
-1

이 manifest가 잘못 되었습니까 ?? 나는 안드로이드 스튜디오를 사용하고 2.3 ** 오류 : 예외 공급 된 매니페스트 파일 C를 구문 분석하는 동안 : \ 사용자 \ HP의 \ 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

두 번째 ''요소의 여는 태그는 자동으로 닫힙니다. 즉, 그 끝에서'/'를 제거하거나 다음 줄에서' '을 삭제하십시오. –

답변

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