FragmentActivity causing ClassNotFoundException

后端 未结 8 2117
心在旅途
心在旅途 2020-12-05 06:48

I just used Android SDK Manager to update Android SDK Tools to revision 17, and Android Compatiblity to revision 7. Now, the program I\'ve been running for ages crashes on

8条回答
  •  广开言路
    2020-12-05 07:41

    I got the

     java.lang.NoClassDefFoundError: com.android.example.SupportFragment
        at com.android.example.SupportFragmentActivity.onCreate()
    

    on PopupMenu

    SupportFragment extends SherlockFragment implements PopupMenu.OnMenuItemClickListener
    ...
        @Override
        public boolean onMenuItemClick(android.view.MenuItem item) {
            return onOptionsItemSelected(item);
        }
    

    when trying to make a api 17 app compatible with api 8, the only indication was the logcat error above, so check that all your imported classes are supported if you get this error.

提交回复
热议问题