java.lang.NoClassDefFoundError: android -


i'm developing app, should support multiple android sdk versions. uses actionbarsherlock library , sliding menu. on android 4.0+ app runs well. when try run on of devices lower sdk version, app crashes strange error. here stack trace:

08-08 11:54:11.626: error/dalvikvm(4782): not find class 'ru.arsenalmedia.avatatoractivity', referenced method ru.arsenalmedia.auth.complete 08-08 11:54:11.646: error/dalvikvm(4782): not find class 'ru.arsenalmedia.avatatoractivity', referenced method ru.arsenalmedia.auth.onactivityresult 08-08 11:54:11.696: error/resourcetype(4782): style contains key bad entry: 0x010102ce 08-08 11:54:12.346: error/dalvikvm(4782): not find class 'android.os.strictmode$threadpolicy$builder', referenced method ru.arsenalmedia.proto.utils.enablestrictmode 08-08 11:54:18.346: error/androidruntime(4782): fatal exception: main         java.lang.noclassdeffounderror: ru.arsenalmedia.avatatoractivity         @ ru.arsenalmedia.auth.complete(auth.java:119)         @ ru.arsenalmedia.proto.serviceworker$clientrequest$2.handlemessage(serviceworker.java:951)         @ android.os.handler.dispatchmessage(handler.java:99)         @ android.os.looper.loop(looper.java:143)         @ android.app.activitythread.main(activitythread.java:4914)         @ java.lang.reflect.method.invokenative(native method)         @ java.lang.reflect.method.invoke(method.java:521)         @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:858)         @ com.android.internal.os.zygoteinit.main(zygoteinit.java:616)         @ dalvik.system.nativestart.main(native method) 

manifest:

   <uses-sdk           android:minsdkversion="8"           android:maxsdkversion="17"             /> <application android:icon="@drawable/icon"              android:label="@string/app_name"              android:name="ru.arsenalmedia.avatator"              android:theme="@style/actionbarstyle"         >     <activity             android:screenorientation="portrait"             android:name="ru.arsenalmedia.auth"             android:label="@string/app_name"             android:cleartaskonlaunch="true">         <intent-filter>             <action android:name="android.intent.action.main" />             <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity>     <activity             android:label="@string/app_name"             android:name="ru.arsenalmedia.avatatoractivity"             android:screenorientation="portrait"             >     </activity>     <activity android:name="ru.arsenalmedia.slidingpanelactivity" />     <activity android:name="ru.arsenalmedia.testact"/>  </application> 

i thought, because of sliding menu. i've tried use native slidingpanelayout, issue same. read lot , nothing helps. please, !!!

import android.app.alertdialog; import android.content.dialoginterface; import android.os.bundle; import android.support.v4.app.fragment; import android.util.log; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.edittext; import android.widget.searchview; import android.widget.textview; import android.widget.toast; import com.actionbarsherlock.view.menu; import com.actionbarsherlock.view.menuinflater; import com.actionbarsherlock.view.menuitem; import com.jeremyfeinstein.slidingmenu.lib.slidingmenu; import com.jeremyfeinstein.slidingmenu.lib.app.slidingfragmentactivity; import ru.arsenalmedia.avatator.r; import ru.arsenalmedia.proto.contactinfo; import ru.arsenalmedia.proto.groupinfo; import ru.arsenalmedia.proto.serviceworker;  public class avatatoractivity extends slidingfragmentactivity implements searchview.onquerytextlistener, menuitem.onactionexpandlistener {      private static final string tag = "avatatoractivity";     protected fragment mfragment;     private searchview searchview;      private menu menu;      @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);          settitle(r.string.app_name);         actionbarinit();          // set above view         if (savedinstancestate != null)             mfragment = getsupportfragmentmanager().getfragment(savedinstancestate, "mfragment");         if (mfragment == null)             mfragment = new groupslist();         //searchview = (edittext) findviewbyid(r.layout.contact_search_edittext);          setcontentview(r.layout.content_frame);         getsupportfragmentmanager()                 .begintransaction()                 .replace(r.id.content_frame, mfragment)                 .commit();          // set behind view         setbehindcontentview(r.layout.menu_frame);         getsupportfragmentmanager()                 .begintransaction()                 .replace(r.id.menu_frame, new appmenufragment())                 .commit();          customizeslidingmenu();         //updatemenutitles();         invalidateoptionsmenu();     }      private void actionbarinit() {         getsupportactionbar().setdisplayhomeasupenabled(true);         getsupportactionbar().sethomebuttonenabled(true);         setslidingactionbarenabled(false);     }      private void customizeslidingmenu() {         slidingmenu sm = getslidingmenu();         sm.setshadowwidthres(r.dimen.shadow_width);         sm.setshadowdrawable(r.drawable.shadow);         sm.setbehindoffsetres(r.dimen.slidingmenu_offset);         sm.setfadedegree(0.35f);         sm.settouchmodeabove(slidingmenu.touchmode_fullscreen);         sm.setbackgroundresource(r.drawable.sliding_menu_selector);     }      @override     public void onsaveinstancestate(bundle outstate) {         super.onsaveinstancestate(outstate);         getsupportfragmentmanager().putfragment(outstate, "mfragment", mfragment);     }      public void switchcontent(fragment fragment) {         log.d(tag, "switch content");         mfragment = fragment;         getsupportfragmentmanager()                 .begintransaction()                 .replace(r.id.content_frame, fragment)                 .commit();         //updatemenutitles();         invalidateoptionsmenu();         getslidingmenu().showcontent();     } 

are using eclipse adt plugin? if so, right click project->properties->java build apth ->order , export, make android dependencies checked.enter image description here

edit: using intellij, have checked if have imported slidingmenu library module?enter image description here

ps. , using android studio & maven, think can import project library if not using maven.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -