表现形式错误?

时间:2014-01-13 19:13:11

标签: java android manifest

我安装应用时遇到错误“明显的错误”。如何修复?

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

<uses-sdk 
    android:minSdkVersion="8" 
    android:targetSdkVersion="11" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:label="@string/app_name"
        android:name=".MainActivity" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <receiver
        android:process=".OnModifyApp" >
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>
</application>
</manifest>

4 个答案:

答案 0 :(得分:4)

android:name="something"中需要<receiver />

答案 1 :(得分:1)

变化:

 <receiver
        android:process=".OnModifyApp" >
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>

<receiver
        android:name=".OnModifyApp" >
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
        </intent-filter>
    </receiver>

答案 2 :(得分:1)

我认为android:name代码中需要android:process字段而不是receiver

答案 3 :(得分:0)

对我而言,这是元数据的问题,我添加了&#39; usb.attached&#39;啄。删除该行可修复错误。