如何在android中为启动接收器连接调试器?
我是android新手。在我的项目中,我在设备启动完成时启动了一项服务,但我不知道如何为它附加调试器。例如,我想调试代码中的一些错误,那么我应该如何继续?请帮助我。提前感谢如何在android中为启动接收器连接调试器?,android,eclipse,debugging,Android,Eclipse,Debugging,我是android新手。在我的项目中,我在设备启动完成时启动了一项服务,但我不知道如何为它附加调试器。例如,我想调试代码中的一些错误,那么我应该如何继续?请帮助我。提前感谢 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.broadcast.receiver.example"
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.broadcast.receiver.example"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".BR_Example"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Declaring broadcast receiver for wifi status changing event -->
<receiver android:name=".MyReceiver " android:enabled="true" android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
</application>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</manifest>
我希望它能帮助你,伙计………这是我已经做过的,我只是想知道我应该如何调试代码
public MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent myIntent = new Intent(context, YourService.class);
context.startService(myIntent);
}