nileshpambhar / MultiPhotoPicker

57 stars 26 forks source link

NullPointerException in setDisplayHomeAsEnabled #2

Open athasamid opened 6 years ago

athasamid commented 6 years ago

error while run this library

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference at com.nileshp.multiphotopicker.photopicker.activity.PickImageActivity.onCreate(PickImageActivity.java:170) at android.app.Activity.performCreate(Activity.java:6367)

MyoZawOo commented 6 years ago

I've got the same error.

athasamid commented 6 years ago

@MyoZawOo i fix this issue by change glide version in your app to specific version 3.8.0 this library use old version of glide

sharkboy777 commented 6 years ago

This exception occurs when the activity theme is having no actionbar.

the parent theme in tag should have actionbar enabled theme.

like android:theme="@style/AppTheme" or any other theme which have actionbar enabled.....

by default the photopicker activity takes the parent theme. So that theme in application should have actionbar enabled.