我创建了一个简单的小部件应用程序,可以在2.3.3模拟器中正常工作。但是,在加载到Android 4.0.3或4.1模拟器上时,该小部件将出现在“应用”选项卡中而不是“小部件”选项卡中。但是,在小部件预览中列出了该小部件。当在小部件预览中选择它时,它可以正常工作。
有关如何调试此问题的最佳建议是什么?
我已经阅读了其他帖子,其中建议在将应用程序添加到小部件列表之前需要先启动一次。我已经尝试过了,但没有成功。
以下是应用程序清单(app manifest)。
有关如何调试此问题的最佳建议是什么?
我已经阅读了其他帖子,其中建议在将应用程序添加到小部件列表之前需要先启动一次。我已经尝试过了,但没有成功。
以下是应用程序清单(app manifest)。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nds.android.silentmodetoggle"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion = "8"
android:targetSdkVersion = "15" />
<application
android:icon = "@drawable/icon"
android:label = "@string/app_name"
android:theme = "@style/AppTheme" >
<activity
android:name = ".MainActivity"
android:label = "@string/title_activity_main" >
<intent-filter>
<action android:name = "android.intent.action.MAIN" />
<category android:name = "android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name = ".AppWidget"
android:exported = "false"
android:label = "@string/app_name"
android:icon = "@drawable/icon" >
<intent-filter>
<action android:name = "android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name = "android.appwidget.provider"
android:resource = "@xml/widget_provider" />
</receiver>
<service android:name = ".AppWidget$ToggleService" />
</application>
</manifest>