Android 什么是错误:(13)错误:<;接收器>;元素必须是<;的直接子元素;应用>;元素[Parent]的意思以及如何修复它?

Android 什么是错误:(13)错误:<;接收器>;元素必须是<;的直接子元素;应用>;元素[Parent]的意思以及如何修复它?,android,android-intent,broadcastreceiver,Android,Android Intent,Broadcastreceiver,我在尝试编译我的应用程序时遇到问题,我试图从拨号程序启动它,清单文件收到此错误。这是我的清单文件 <uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_

我在尝试编译我的应用程序时遇到问题,我试图从拨号程序启动它,清单文件收到此错误。这是我的清单文件

<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <receiver
            android:name=".receiver.DialReceiver"
            android:exported="true"

            android:process=":background"
            >
            <intent-filter>
                <action android:name="android.intent.action.NEW_OUTGOING_CALL" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </receiver>
    </activity>
</application>

移动



标记之外

尝试如下修改您的清单:

<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
    </activity>
    <receiver
        android:name=".receiver.DialReceiver"
        android:exported="true"
        android:process=":background">
        <intent-filter>
            <action android:name="android.intent.action.NEW_OUTGOING_CALL" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </receiver>
</application>


当我这样做时,android:name=“.receiver.DialReceiver”变成一个错误无法解析symbol receiver,也无法解析symbol DialReceiver
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"/>
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
    </activity>
    <receiver
        android:name=".receiver.DialReceiver"
        android:exported="true"
        android:process=":background">
        <intent-filter>
            <action android:name="android.intent.action.NEW_OUTGOING_CALL" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </receiver>
</application>