user1635430
user1635430

Reputation: 66

java.lang.NoClassDefFoundError on Android 2.3.3 - 2.3.7

I've developed simple android app that works OK on the last versions of Android. But Google play report that some users with Android 2.3.3 - 2.3.7 have the next problem:

java.lang.NoClassDefFoundError: com.toolbarderv.aliexpressnavigator.SettingsActivity$GeneralPreferenceFragment
at com.toolbarderv.aliexpressnavigator.MainActivity$JsObject.getFragmentName(MainActivity.java:184)
at com.toolbarderv.aliexpressnavigator.MainActivity$JsObject.showOptions(MainActivity.java:156)
at android.webkit.WebViewCore.nativeTouchUp(Native Method)
at android.webkit.WebViewCore.nativeTouchUp(Native Method)
at android.webkit.WebViewCore.access$3300(WebViewCore.java:56)
at android.webkit.WebViewCore$EventHub$1.handleMessage(WebViewCore.java:1202)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:655)
at java.lang.Thread.run(Thread.java:1019)

The problem appear when a user press Settings menu item and trying to open Settings screen. I use the next code to call Settings page:

        Intent i = new Intent(MainActivity.this, SettingsActivity.class);
        i.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, getFragmentName(fragment));
        startActivityForResult(i, RESULT_SETTINGS);

I don't use Proguard. As I told, this way works on all versions of Android but some old. Great thanks for any ideas.

Upvotes: 0

Views: 326

Answers (2)

Salem
Salem

Reputation: 12986

Fragments are only available after Honeycomb, if I am not mistaken.

To use them in Gingerbread you will need Support library

Upvotes: 1

yuralife
yuralife

Reputation: 1582

Check please if you correctly added libraries to your project. Check "Export" checkboxes in front of them.

Upvotes: 0

Related Questions