2010-11-30 22 views
1

ここに少し問題があります。私は、ホームスクリーンに私のAppWidgetをインストールしようとすると、なぜ私はSecurityExceptionを取得しているのかわかりません。私はこの問題を解決するのに役立ちます知っているが、ここで初心者のための簡略化logcat出力と私のAndroidのマニフェストではありません。HomeScreenにappWidgetをインストールしようとするとSecurityExceptionが発生する

11-30 18:02:16.454: ERROR/AndroidRuntime(287): Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.appwidget.action.APPWIDGET_CONFIGURE cmp=com.MuchachaApps.WeatherViewer/.WeatherForecastConfigure (has extras) } from ProcessRecord{44e58dc8 287:android.process.acore/10001} (pid=287, uid=10001) requires null 
11-30 18:02:16.454: ERROR/AndroidRuntime(287):atandroid.os.Parcel.readException(Parcel.java:1218) 
113018:02:16.454:ERROR/AndroidRuntime(287):atandroid.os.Parcel.readException(Parcel.java:1206) 
113018:02:16.454:ERROR/AndroidRuntime(287):atandroid.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1214) 
113018:02:16.454:ERROR/AndroidRuntime(287):atandroid.app.Instrumentation.execStartActivity(Instrumentation.java:1373) 
113018:02:16.454:ERROR/AndroidRuntime(287):atandroid.app.Activity.startActivityForResult(Activity.java:2749) 
113018:02:16.454:ERROR/AndroidRuntime(287):atcom.android.launcher.Launcher.startActivityForResult(Launcher.java:969) 
113018:02:16.454:ERROR/AndroidRuntime(287):atcom.android.launcher.Launcher.addAppWidget(Launcher.java:1148) 
113018:02:16.454:ERROR/AndroidRuntime(287):atcom.android.launcher.Launcher.onActivityResult(Launcher.java:379) 
113018:02:16.454:ERROR/AndroidRuntime(287):atandroid.app.Activity.dispatchActivityResult(Activity.java:3828) 
113018:02:16.454:ERROR/AndroidRuntime(287):atandroid.app.ActivityThread.deliverResults(ActivityThread.java:3325) 
11-30 18:02:16.454: ERROR/AndroidRuntime(287):... 11 more 

私のAndroidのマニフェスト:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
     package="com.MuchaaApps.WeatherViewer" 
     android:versionCode="1" 
     android:versionName="1.0"> 
    <application android:icon="@drawable/icon" android:label="@string/app_name"> 
     <service android:name= "weatherForecast"></service> 

<activity android:name=".WeatherForecastConfigure" android:label="@string/app_name"></activity> 

<receiver android:name="WeatherWidgetProvider" android:label="Weather Forecast"> 
    <intent-filter> 
     <action android:name= "android.appwidget.action.APPWIDGET_UPDATE"></action> 
    </intent-filter> 
     <intent-filter> 
     <action android:name="com.MuchaaApps.WeatherViewer.WEATHER_UPDATE"></action> 
     </intent-filter> 
      <meta-data android:name="android.appwidget.provider" 
      android:resource="@xml/weather_appwidget_info"></meta-data> 
     </receiver> 
    </application> 

    <uses-sdk android:minSdkVersion="4" /> 
    <uses-permission android:name="android.permission.INTERNET"/> 

</manifest> 

を使用すると、他の情報が必要な場合は、私にお知らせください。ありがとう

+0

誰もがこの前に出会えますか?..お願いします。 – irobotxxx

+0

助けてください。 – irobotxxx

答えて

3

ウィジェットをランチャーに追加すると、アクティビティが表示されますか?その場合は、インテントフィルタにAPPWIDGET_CONFIGUREアクションを追加する必要があります。そうでない場合は、appwidget-provider XMLからandroid:configure属性を削除する必要があります。

1つではなく他のものを持つことが問題です。

関連する問題