AndroidManifest提示Top level element is not completed


完整的AndroidManifest如下
我用的是Android studio 1.1.0
错误提示是 Top level element is not completed
Google 百度 无果,表示很悲伤,我也不知道怎么就报了这个错。。。。
图片描述
图片描述



 <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<application
    android:allowBackup="true"
    android:hardwareAccelerated="false"
    android:icon="@drawable/packagelogo"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <activity
        android:name=".login"
        android:label="@string/app_name"
        android:theme="@style/Theme.AppCompat.Light.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".main"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">

    </activity>
    <activity
        android:name=".newscontent"
        android:label="@string/title_activity_newscontent"
        android:parentActivityName=".main">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".main" />
    </activity>
    <activity
        android:name=".webview"
        android:label="@string/title_activity_webview"
        android:parentActivityName=".main">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".main" />
    </activity>
    <activity
        android:name=".CaptureActivity"
        android:configChanges="orientation|keyboardHidden"
        android:label="@string/title_activity_scan"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden">

    </activity>
</application>

Android android-studio

江协伟的小号 9 years, 5 months ago

你的结构是这样子的吗?


 <?xml version="1.0" encoding="utf-8"?>

<manifest>

    <uses-permission />
    <permission />
    <permission-tree />
    <permission-group />
    <instrumentation />
    <uses-sdk />
    <uses-configuration />  
    <uses-feature />  
    <supports-screens />  
    <compatible-screens />  
    <supports-gl-texture />  

    <application>

        <activity>
            <intent-filter>
                <action />
                <category />
                <data />
            </intent-filter>
            <meta-data />
        </activity>

        <activity-alias>
            <intent-filter> . . . </intent-filter>
            <meta-data />
        </activity-alias>

        <service>
            <intent-filter> . . . </intent-filter>
            <meta-data/>
        </service>

        <receiver>
            <intent-filter> . . . </intent-filter>
            <meta-data />
        </receiver>

        <provider>
            <grant-uri-permission />
            <meta-data />
            <path-permission />
        </provider>

        <uses-library />

    </application>

</manifest>

参考地址(需要爬墙): http://developer.android.com/guide/topics/manifest/manifest-intro.html

鱼头星星人 answered 9 years, 5 months ago

你顶上的还少东西啊


 <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="x.xx"
    android:versionCode="1"
    android:versionName="1.0.0">

哦哟、不错哦 answered 9 years, 5 months ago

Your Answer