找不到元素'manifest'的声明

时间:2018-03-16 06:14:51

标签: android android-manifest

这是我的构建apk中的manifest.xml,它显示错误为:

  

无法找到元素'manifest'的声明

所以我无法在仿真器或任何设备上运行我的应用程序。希望我尽快找到解决方案。

请帮帮我。     

<uses-sdk
    android:minSdkVersion="18"
    android:targetSdkVersion="26" />

<uses-permission
    android:name="android.permission.WAKE_LOCK" />

<application
    android:label="chintumusic"
    android:icon="@ref/0x7f030000"
    android:debuggable="true"
    android:screenOrientation="1"
    android:allowBackup="true"
    android:supportsRtl="true"
    android:roundIcon="@ref/0x7f030001">

    <activity
        android:label="@ref/0x7f060021"
        android:name="com.example.chintu.chintumusic.MainActivity"
        android:launchMode="1"
        android:screenOrientation="1">

        <intent-filter>

            <action
                android:name="android.intent.action.MAIN" />

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

    <service
        android:name="com.example.chintu.chintumusic.MusicService" />

    <meta-data
        android:name="android.support.VERSION"
        android:value="26.1.0" />

    <meta-data
        android:name="android.arch.lifecycle.VERSION"
        android:value="27.0.0-SNAPSHOT" />
</application>

1 个答案:

答案 0 :(得分:0)

嗨kotakonda saicharan你的主要文件应该是这样的。

*

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.restaurantyp">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <application
        android:name="com.restaurantyp.MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:screenOrientation="portrait"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name="com.restaurantyp.activities.SplashActivity"
            android:screenOrientation="portrait"
            android:theme="@style/SplashTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <meta-data
            android:name="com.facebook.sdk.ApplicationId"
            android:value="@string/facebook_app_id" />
        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="${applicationId}.provider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_path" />
        </provider>
        <activity
            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
            android:screenOrientation="portrait"
            android:theme="@style/Base.Theme.AppCompat" />
        <activity
            android:name="com.restaurantyp.activities.LogInActivity"
            android:screenOrientation="portrait"
            android:theme="@style/WithTranslucent"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden|adjustUnspecified" />
        <activity
            android:name="com.restaurantyp.activities.ForgotPasswordActivity"
            android:screenOrientation="portrait"
            android:theme="@style/WithTranslucent"
            android:windowSoftInputMode="adjustResize|stateAlwaysHidden|adjustUnspecified" />
</manifest>

*