为什么我在 运行 项目之后以及连接或断开设备时得到 'Unfortunately (my_APP) has stopped'?

Why am I getting 'Unfortunately (my_APP) has stopped' after running project and when I connect or disconnect device?

在这里我遇到了一个非常奇怪的错误。我的应用程序运行正常,但是当我将设备连接到 运行 或断开连接时,它会显示消息 "unfortunately stopped.." 请帮我摆脱它。 这是清单文件。

AndroidManifest.xml

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

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="19" />

<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

<application
    android:adjustViewBounds="true"
    android:allowBackup="true"
    android:background="@null"
    android:icon="@drawable/app_icon"
    android:label="@string/app_name" >
    <activity
        android:name="com.example.medical.Registration_Activity"
        android:label="@string/app_name"
        android:launchMode="standard"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="com.example.medical.Registered"
        android:label="@string/title_activity_registered"
        android:theme="@style/AppBaseTheme" >
    </activity>
    <activity
        android:name="com.example.medical.Diseases"
        android:label="@string/title_activity_diseases"
        android:permission="android.permission.READ_CONTACTS"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" >
    </activity>
    <activity
        android:name="com.example.medical.Homepage"
        android:label="@string/title_activity_homepage" >
    </activity>
    <activity
        android:name="com.example.medical.About_us"
        android:label="@string/title_activity_about_us" >
    </activity>
    <activity
        android:name="com.example.medical.Medicines"
        android:label="@string/title_activity_medicines"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="com.example.medical.Econtact"
        android:label="@string/title_activity_econtact"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="com.example.medical.Sos"
        android:label="@string/title_activity_sos"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="com.example.medical.Setting"
        android:label="@string/title_activity_setting"
        android:theme="@style/Theme.Transparent" >
    </activity>
    <activity
        android:name="com.example.medical.Setdata"
        android:label="@string/title_activity_setdata" >
    </activity>
    <activity
        android:name="com.example.medical.ViewDisease"
        android:label="@string/title_activity_view_disease" >
    </activity>
    <activity
        android:name="com.example.medical.Diet"
        android:label="@string/title_activity_diet"
        android:theme="@style/AppBaseTheme" >
    </activity>
    <activity
        android:name="com.example.medical.Diet_today"
        android:label="@string/title_activity_diet_today" >
    </activity>
    <activity
        android:name="com.example.medical.Ecall"
        android:label="@string/title_activity_ecall" >
    </activity>
    <activity
        android:name="com.example.medical.Form"
        android:label="@string/title_activity_password"
        android:theme="@style/Theme.Transparent" >
    </activity>

    <receiver android:name="com.test.check.MyReceiver" >
        <intent-filter>
            <action android:name="android.intent.action.SCREEN_OFF" >
            </action>
            <action android:name="android.intent.action.SCREEN_ON" >
            </action>
            <action android:name="android.intent.action.ACTION_POWER_CONNECTED" >
            </action>
            <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" >
            </action>
            <action android:name="android.intent.action.ACTION_SHUTDOWN" >
            </action>
        </intent-filter>
    </receiver>

    <activity
        android:name="com.example.medical.View_medicines"
        android:label="@string/title_activity_view_medicines" >
    </activity>
    <activity
        android:name="com.example.medical.Ringalarm"
        android:label="@string/title_activity_ringalarm" >
    </activity>
</application>

它有很简单的解决方案,接受我的愚蠢错误.. 只需从 Manifest.xml 文件

中删除这些行,我的应用程序就可以正常工作
       <action android:name="android.intent.action.ACTION_POWER_CONNECTED" >
        </action>
        <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"        >
        </action>