亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

程序崩掉了


04-23 12:17:06.115 24702-24702/com.example.ly.myapplication E/AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.example.ly.myapplication.NewAppWidget: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.ly.myapplication/com.example.ly.myapplication.Myservice}; have you declared this activity in your AndroidManifest.xml?

04-23 12:17:06.115 24702-24702/com.example.ly.myapplication E/AndroidRuntime: ?Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.ly.myapplication/com.example.ly.myapplication.Myservice}; have you declared this activity in your AndroidManifest.xml?

04-23 12:17:06.115 24702-24702/com.example.ly.myapplication E/AndroidRuntime: ? ? at com.example.ly.myapplication.NewAppWidget.onEnabled(NewAppWidget.java:31)


但是也注冊了啊


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

? ?<application
? ? ? ?android:allowBackup="true"
? ? ? ?android:icon="@mipmap/ic_launcher"
? ? ? ?android:label="@string/app_name"
? ? ? ?android:supportsRtl="true"
? ? ? ?android:theme="@style/AppTheme" >
? ? ? ?<activity
? ? ? ? ? ?android:name=".MainActivity"
? ? ? ? ? ?android:label="@string/app_name"
? ? ? ? ? ?android:theme="@style/AppTheme.NoActionBar" >
? ? ? ? ? ?<intent-filter>
? ? ? ? ? ? ? ?<action android:name="android.intent.action.MAIN" />
? ? ? ? ? ? ? ?<category android:name="android.intent.category.LAUNCHER" />
? ? ? ? ? ?</intent-filter>
? ? ? ?</activity>

? ? ? ?<service android:name=".Myservice"></service>


? ? ? ?<receiver android:name=".NewAppWidget" >
? ? ? ? ? ?<intent-filter>
? ? ? ? ? ? ? ?<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
? ? ? ? ? ?</intent-filter>
? ? ? ? ? ?<meta-data
? ? ? ? ? ? ? ?android:name="android.appwidget.provider"
? ? ? ? ? ? ? ?android:resource="@xml/new_app_widget_info" />
? ? ? ?</receiver>

? ?</application>

</manifest>

正在回答

1 回答

原來context.startService寫錯了 .... 這提問怎么沒有撤回...

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Android-Widget桌面小組件
  • 參與學習       29578    人
  • 解答問題       32    個

Android-Widget桌面小組件的使用,帶你實現多個小組件功能

進入課程

程序崩掉了

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號