2012-06-24 59 views
0

我想製作一個小部件,但是當我安裝我的應用程序時,它不會出現在小部件列表中,我認爲這意味着我的清單文件有問題。已經嘗試了幾個不同的例子1.5-2.2,重新蜂窩和後蜂窩窗口小部件的工作方式有什麼不同嗎?小部件沒有出現

反正這是我的清單

<!-- Broadcast Receiver that will process AppWidget updates --> 
    <receiver android:name=".ButtonWidget" android:label="@string/app_name"> 
    <intent-filter> 
     <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> 

     <!-- Broadcast Receiver that will also process our self created action --> 
     <action android:name="com.dotpubs.counterpro.ButtonWidget.ACTION_WIDGET_RECEIVER"/> 
    </intent-filter> 
    <meta-data android:name="android.appwidget.provider" android:resource="@xml/button_widget_provider" /> 
    </receiver> 

    <!-- this activity will be called, when we fire our self created ACTION_WIDGET_CONFIGURE --> 
    <activity android:name=".ClickOneActivity"> 
     <intent-filter> 
      <action android:name="com.dotpubs.counterpro.ACTION_WIDGET_CONFIGURE"/> 
     </intent-filter> 
    </activity> 

    <intent-filter > 
     <action android:name="android.intent.action.MAIN" /> 
     <category android:name="android.intent.category.LAUNCHER" /> 
+0

並非所有的代碼都顯示,我不知道爲什麼,當我嘗試編輯它顯示,任何人都可以幫助嗎? – jcw

+0

當您運行應用程序時,請注意LogCat,並且可能會有一條日誌消息告訴您出了什麼問題。 – Mike

回答

0

任何機會的窗口小部件部分中,您正在運行的是Android 4.0.3?

該版本存在已知問題。看到issue 24208

+0

是的,但我已經嘗試重新啓動..... – jcw