Android Lollipop: Launcher crashes when adding app widget to Home Screen -


the launcher crashes on android lollipop when adding widget giving following message (it works fine on previous android versions):

edit: happens in landscape orientation.

12-16 12:35:10.208: e/androidruntime(960):  java.lang.runtimeexception: unable resume activity {com.android.launcher/com.android.launcher2.launcher}: java.lang.runtimeexception: failure delivering result resultinfo{who=null, request=5, result=-1, data=intent { (has extras) }}  activity {com.android.launcher/com.android.launcher2.launcher}: java.lang.nullpointerexception:      attempt read field 'android.content.pm.activityinfo      android.appwidget.appwidgetproviderinfo.providerinfo' on null object reference 12-16 12:35:10.208: e/androidruntime(960):  @  android.appwidget.appwidgethostview.getremotecontext(appwidgethostview.java:465) 12-16 12:35:10.208: e/androidruntime(960):  @    android.appwidget.appwidgethostview.updateappwidget(appwidgethostview.java:376) 12-16 12:35:10.208: e/androidruntime(960):  @ com.android.launcher2.launcherappwidgethostview.updateappwidget(launcherappwidgethostview.java:54) 12-16 12:35:10.208: e/androidruntime(960):  @ android.appwidget.appwidgethost.createview(appwidgethost.java:325) 12-16 12:35:10.208: e/androidruntime(960):  @ com.android.launcher2.launcher.completetwostagewidgetdrop(launcher.java:703) 12-16 12:35:10.208: e/androidruntime(960):  @  com.android.launcher2.launcher.onactivityresult(launcher.java:664) 

this provider info:

<?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"   android:minwidth="201dp"   android:minheight="201dp"   android:updateperiodmillis="180000"   android:initiallayout="@layout/appwidget_week"   android:configure="com.example.myapp.widgets.configure.widgetconfigure_week"   android:resizemode="horizontal|vertical"   android:previewimage="@drawable/widget_screenshot_week"    android:label="@string/widget_week"> </appwidget-provider>  

and manifest:

    <receiver         android:name="com.example.myapp.widgets.provider.widgetprovider_week"         android:enabled="@bool/is_above_version_3_1"         android:label="@string/widget_week" >         <intent-filter>             <action android:name="android.appwidget.action.appwidget_update" />         </intent-filter>          <meta-data             android:name="android.appwidget.provider"             android:resource="@xml/appwidget_week_provider_info" />     </receiver> 


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -