»

Android errors

The mobile operating system of Google

https://developer.android.com/
Solution coverage:
Summary coverage:

Top patterns

  1. Unhandled exception during activity initialization

    Check the body of your activity's onCreate(), onResume methods and the initializations of variables

  2. Trying to use a class which isn't in the dependencies

    You should check:

    • The dependencies of the project
    • Correct multidex configuration
    • Try to disable Instant Run
  3. Tried to access to a resource without permission

    Request the required permission, before you start to use the resource:

    https://developer.android.com/training/permissions/requesting

Error patternsPackagesClassesMethodsExceptions
DescriptionException TypeEntry MethodWeb pages

Unhandled exception during activity initialization

java.lang.RuntimeException
android.app.ActivityThread.performLaunchActivity
4439Web pages
1Solution
RuntimeExceptionActivityThread.performLaunchActivity4439

Trying to use a class which isn't in the dependencies

java.lang.ClassNotFoundException
dalvik.system.BaseDexClassLoader.findClass
2152Web pages
1Solution
ClassNotFoundExceptionBaseDexClassLoader.findClass2152

Tried to access to a resource without permission

java.lang.SecurityException
android.os.Parcel.readException
1351Web pages
1Solution
SecurityExceptionParcel.readException1351

There is no Activity to handle Intent

android.content.ActivityNotFoundException
android.app.Instrumentation.checkStartActivityResult
1178Web pages
1Solution
ActivityNotFoundExceptionInstrumentation.checkStartActivityResult1178

Executed network call on the main thread

android.os.NetworkOnMainThreadException
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork
1067Web pages
1Solution
NetworkOnMainThreadExceptionStrictMode$AndroidBlockGuardPolicy.onNetwork1067

Exception during SQL statement execution

android.database.sqlite.SQLiteException
android.database.sqlite.SQLiteConnection.nativePrepareStatement
983Web pages
1Solution
SQLiteExceptionSQLiteConnection.nativePrepareStatement983

Trying to use an unknown class

java.lang.ClassNotFoundException
dalvik.system.PathClassLoader.findClass
675Web pages
ClassNotFoundExceptionPathClassLoader.findClass675

Used bad or invalid Context to display the view

android.view.WindowManager$BadTokenException
android.view.ViewRootImpl.setView
600Web pages
WindowManager$BadTokenExceptionViewRootImpl.setView600

Resource used doesn't exist

android.content.res.Resources$NotFoundException
android.content.res.Resources.getValue
550Web pages
Resources$NotFoundExceptionResources.getValue550

Used image is too large

java.lang.OutOfMemoryError
android.graphics.BitmapFactory.nativeDecodeAsset
506Web pages
OutOfMemoryErrorBitmapFactory.nativeDecodeAsset506

Tried to modify the UI from a background thread

android.view.ViewRootImpl$CalledFromWrongThreadException
android.view.ViewRootImpl.checkThread
409Web pages
ViewRootImpl$CalledFromWrongThreadExceptionViewRootImpl.checkThread409

Communication between threads is handled incorrectly

java.lang.RuntimeException
android.os.Handler.<init>
393Web pages
RuntimeExceptionHandler.<init>393

Can't put a view with parent inside an another view

java.lang.IllegalStateException
android.view.ViewGroup.addViewInner
377Web pages
IllegalStateExceptionViewGroup.addViewInner377

Posix.open() has thrown an ErrnoException

android.system.ErrnoException
libcore.io.Posix.open
335Web pages
ErrnoExceptionPosix.open335

The application's memory is leaking

java.lang.OutOfMemoryError
android.graphics.Bitmap.nativeCreate
328Web pages
OutOfMemoryErrorBitmap.nativeCreate328

Tried to read from an uninitialized cursor

android.database.CursorIndexOutOfBoundsException
android.database.AbstractCursor.checkPosition
316Web pages
1Solution
CursorIndexOutOfBoundsExceptionAbstractCursor.checkPosition316

Check the lifecycle state of view, before you try to do something with it

java.lang.IllegalArgumentException
android.view.WindowManagerGlobal.findViewLocked
307Web pages
IllegalArgumentExceptionWindowManagerGlobal.findViewLocked307

Service lifecycle handled incorrectly

android.app.ServiceConnectionLeaked
android.app.LoadedApk$ServiceDispatcher.<init>
307Web pages
ServiceConnectionLeakedLoadedApk$ServiceDispatcher.<init>307

Posix.open() has thrown an ErrnoException

libcore.io.ErrnoException
libcore.io.Posix.open
304Web pages
ErrnoExceptionPosix.open304

You must to update your adapter after data modification

java.lang.IndexOutOfBoundsException
android.support.v7.widget.RecyclerView$Recycler.getViewForPosition
286Web pages
IndexOutOfBoundsExceptionRecyclerView$Recycler.getViewForPosition286

You got an unhandled exception during activity restore

java.lang.RuntimeException
android.app.ActivityThread.performResumeActivity
274Web pages
RuntimeExceptionActivityThread.performResumeActivity274

You have a problem with the initialization of your Fragment class

android.view.InflateException
android.view.LayoutInflater.createViewFromTag
265Web pages
InflateExceptionLayoutInflater.createViewFromTag265

Tried to log a null reference

java.lang.NullPointerException
android.util.Log.println_native
259Web pages
1Solution
NullPointerExceptionLog.println_native259

Array resource used is missing

java.lang.NullPointerException
android.widget.ArrayAdapter.createViewFromResource
254Web pages
NullPointerExceptionArrayAdapter.createViewFromResource254

You must to handle correctly the lifecycle of your Activity

android.view.WindowLeaked
android.view.WindowManagerImpl.addView
245Web pages
WindowLeakedWindowManagerImpl.addView245

You try to use a view, which is not exist

java.lang.NullPointerException
android.app.Activity.findViewById
237Web pages
NullPointerExceptionActivity.findViewById237

You should check the the parameters of your Notification

android.app.RemoteServiceException
android.app.ActivityThread$H.handleMessage
228Web pages
RemoteServiceExceptionActivityThread$H.handleMessage228

View.performClick() has thrown a NullPointerException

java.lang.NullPointerException
1 frames hidden
android.view.View.performClick
227Web pages
NullPointerExceptionView.performClick227

SQLiteConnection.open() has thrown a SQLiteCantOpenDatabaseException

android.database.sqlite.SQLiteCantOpenDatabaseException
2 frames hidden
android.database.sqlite.SQLiteConnection.open
220Web pages
SQLiteCantOpenDatabaseExceptionSQLiteConnection.open220

IoBridge.open() has thrown a FileNotFoundException

java.io.FileNotFoundException
libcore.io.IoBridge.open
207Web pages
1Solution
FileNotFoundExceptionIoBridge.open207

ArrayList$ArrayListIterator.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList$ArrayListIterator.next
199Web pages
ConcurrentModificationExceptionArrayList$ArrayListIterator.next199

You must to handle correctly the lifecycle of your Camera object

java.lang.RuntimeException
android.hardware.Camera.native_setParameters
192Web pages
RuntimeExceptionCamera.native_setParameters192

You must to set the width and height parameters properly to Bitmap

java.lang.IllegalArgumentException
android.graphics.Bitmap.createBitmap
189Web pages
IllegalArgumentExceptionBitmap.createBitmap189

PointerIndex must be greater than 0

java.lang.IllegalArgumentException
android.view.MotionEvent.nativeGetAxisValue
181Web pages
IllegalArgumentExceptionMotionEvent.nativeGetAxisValue181

Add the correct flags to start activity from outside of an Activity context

android.util.AndroidRuntimeException
android.app.ContextImpl.startActivity
176Web pages
AndroidRuntimeExceptionContextImpl.startActivity176

StringToReal.invalidReal() has thrown a NumberFormatException

java.lang.NumberFormatException
java.lang.StringToReal.invalidReal
175Web pages
NumberFormatExceptionStringToReal.invalidReal175

Database connection is already closed

java.lang.IllegalStateException
android.database.sqlite.SQLiteClosable.acquireReference
171Web pages
1Solution
IllegalStateExceptionSQLiteClosable.acquireReference171

Database constraint failed

android.database.sqlite.SQLiteConstraintException
android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId
167Web pages
1Solution
SQLiteConstraintExceptionSQLiteConnection.nativeExecuteForLastInsertedRowId167

You must to check the length of String

java.lang.IndexOutOfBoundsException
android.text.SpannableStringBuilder.checkRange
166Web pages
IndexOutOfBoundsExceptionSpannableStringBuilder.checkRange166

Check your Cursor initialization, before use it.

java.lang.IllegalStateException
android.database.CursorWindow.nativeGetString
165Web pages
IllegalStateExceptionCursorWindow.nativeGetString165

You are communicating incorrectly between threads

java.lang.IllegalStateException
android.os.MessageQueue.enqueueMessage
161Web pages
IllegalStateExceptionMessageQueue.enqueueMessage161

You try to use a missing asset

java.io.FileNotFoundException
android.content.res.AssetManager.openAsset
154Web pages
FileNotFoundExceptionAssetManager.openAsset154

You have a problem with the initialization of your Service class

java.lang.RuntimeException
android.app.ActivityThread.handleServiceArgs
152Web pages
RuntimeExceptionActivityThread.handleServiceArgs152

BinderProxy.sendDeathNotice() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
3 frames hidden
android.os.BinderProxy.sendDeathNotice
149Web pages
IllegalArgumentExceptionBinderProxy.sendDeathNotice149

Action cannot be performed at this phase of the lifecycle of Fragment

java.lang.IllegalStateException
android.app.FragmentManagerImpl.checkStateLoss
144Web pages
IllegalStateExceptionFragmentManagerImpl.checkStateLoss144

If your targetSdkVersion is 24 or higher, you can not use file: Uri values in Intents

android.os.FileUriExposedException
android.os.StrictMode.onFileUriExposed
142Web pages
FileUriExposedExceptionStrictMode.onFileUriExposed142

You must to update your adapter after data modification

java.lang.IndexOutOfBoundsException
android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition
141Web pages
IndexOutOfBoundsExceptionRecyclerView$Recycler.validateViewHolderForOffsetPosition141

You are trying to use ListActivity whose id attribute 'android.R.id.list' isn't exist

java.lang.RuntimeException
android.app.ListActivity.onContentChanged
135Web pages
RuntimeExceptionListActivity.onContentChanged135

You got an unhandled exception during activity destroy

java.lang.RuntimeException
android.app.ActivityThread.performDestroyActivity
127Web pages
RuntimeExceptionActivityThread.performDestroyActivity127

You must to register your Receivers in your Manifest.xml

java.lang.IllegalArgumentException
android.app.LoadedApk.forgetReceiverDispatcher
127Web pages
IllegalArgumentExceptionLoadedApk.forgetReceiverDispatcher127
Nothing to list here.
Nothing to list here.
Nothing to list here.
Nothing to list here.