actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS) produce NullPointerException

后端 未结 2 646
无人共我
无人共我 2021-01-21 20:08
import android.app.ActionBar;
import android.app.FragmentTransaction;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActi         


        
2条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 20:49

    The real problem is in res/values/style.xml and res/values-v14/style.xml in the AppBaseTheme (in two styles).
    If change Theme.AppCompat.Light and Theme.AppCompat.Light.DarkActionBar by Theme.Holo.Light and Theme.Holo.Light.DarkActionBar in manifest down android:minSdkVersion to version 11, it SOLVES the problem...
    But it generates another problem: you lose AppCompat.Light theme...
    But error NullExceptionPointer in actionbar.setNavigationmode is solved..

提交回复
热议问题