Atiq
Atiq

Reputation: 31

App crashes if Activity starts portrait Mode

I have Android Studio 2.3 bet 3, somehow my application is behaving strangely. If the activity starts in portrait mode it crashes straight a way. But if it starts in landscape mode it does well even if i rotate to portrait mode.

Here are the crash logs.but same XML file line and error comes for all activities.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.activity.VisitsActivity}: android.view.InflateException: Binary XML file line #43: Error inflating class android.support.v7.widget.ActionBarContextView

Upvotes: 0

Views: 140

Answers (1)

Atiq
Atiq

Reputation: 31

dimen.xml for portrait doesn't have some values which are defined in landscape dimen.xml. that's why it crashes in portrait mode

Upvotes: 1

Related Questions