Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: NoClassDefFoundError
    text
    copied!<p>I have a project in which, when a particular activity is called from an explicit intent, i have a crash followed by this type of error. The fact that i don't understand is how on devices with android 4.0 or higher everything works fine. I have tried to run the application on android 2.2 and android 2.3 and i have the crash with this error. The activity that causes the crash doesn't require any type of external jars, except for the android-support-v4 one. I have tried to think some several solutions, for example the compatibility of fragment api (but there is the support-v4 for this, right?), but i haven't found anything that can help me. Do you have some suugestions for my problem? Thanks in advance!</p> <p>E/dalvikvm(278): Could not find class 'com.example.MainActivity', referenced from method com.example.SplashActivity$1.handleMessage</p> <p>E/AndroidRuntime(278): java.lang.NoClassDefFoundError: com.example.MainActivity</p> <p>E/AndroidRuntime(278): at com.example.SplashActivity$1.handleMessage(SplashActivity.java:53)</p> <p>E/AndroidRuntime(278): at android.os.Handler.dispatchMessage(Handler.java:99)</p> <p>E/AndroidRuntime(278): at android.os.Looper.loop(Looper.java:123)</p> <p>E/AndroidRuntime(278): at android.app.ActivityThread.main(ActivityThread.java:4627)</p> <p>E/AndroidRuntime(278): at java.lang.reflect.Method.invokeNative(Native Method)</p> <p>E/AndroidRuntime(278): at java.lang.reflect.Method.invoke(Method.java:521)</p> <p>E/AndroidRuntime(278): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)</p> <p>E/AndroidRuntime(278): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)</p> <p>E/AndroidRuntime(278): at dalvik.system.NativeStart.main(Native Method)</p> <pre><code>import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import android.annotation.SuppressLint; import android.app.ActionBar; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Environment; import android.support.v4.app.FragmentActivity; import android.text.Editable; import android.text.Html; import android.text.TextUtils; import android.text.TextWatcher; import android.view.Gravity; import android.view.Menu; import android.view.MenuItem; import android.view.MenuItem.OnMenuItemClickListener; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnFocusChangeListener; import android.view.inputmethod.InputMethodManager; import android.webkit.MimeTypeMap; import android.widget.Button; import android.widget.PopupWindow; import android.widget.SearchView; import android.widget.SearchView.OnCloseListener; import android.widget.SearchView.OnQueryTextListener; import android.widget.TextView; import android.widget.Toast; @SuppressLint("NewApi") public class MainActivity extends FragmentActivity implements MenuFragment.OnListSelectedListener,DetailsFragment.OnSaveListener, OnCloseListener, OnQueryTextListener, android.widget.PopupMenu.OnMenuItemClickListener, OnFocusChangeListener, OnMenuItemClickListener,OnClickListener,TextWatcher{ </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload