Android errors

The mobile operating system of Google

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

Top patterns

  1. You got an 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


DescriptionException TypeEntry MethodWeb pages

You got an unhandled exception during activity initialization

java.lang.RuntimeException
android.app.ActivityThread.performLaunchActivity
4298Web pages
1Solution
RuntimeExceptionActivityThread.performLaunchActivity4298

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

java.lang.ClassNotFoundException
dalvik.system.BaseDexClassLoader.findClass
2120Web pages
1Solution
ClassNotFoundExceptionBaseDexClassLoader.findClass2120

Tried to access to a resource without permission

java.lang.SecurityException
android.os.Parcel.readException
1314Web pages
1Solution
SecurityExceptionParcel.readException1314

There is no Activity to handle Intent

android.content.ActivityNotFoundException
android.app.Instrumentation.checkStartActivityResult
1160Web pages
1Solution
ActivityNotFoundExceptionInstrumentation.checkStartActivityResult1160

Executed network call on the main thread

android.os.NetworkOnMainThreadException
android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork
1065Web pages
1Solution
NetworkOnMainThreadExceptionStrictMode$AndroidBlockGuardPolicy.onNetwork1065

Exception during SQL statement execution

android.database.sqlite.SQLiteException
android.database.sqlite.SQLiteConnection.nativePrepareStatement
970Web pages
1Solution
SQLiteExceptionSQLiteConnection.nativePrepareStatement970

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
587Web pages
WindowManager$BadTokenExceptionViewRootImpl.setView587

Resource used doesn't exist

android.content.res.Resources$NotFoundException
android.content.res.Resources.getValue
548Web pages
Resources$NotFoundExceptionResources.getValue548

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
402Web pages
ViewRootImpl$CalledFromWrongThreadExceptionViewRootImpl.checkThread402

Communication between threads is handled incorrectly

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

Unhandled exception during get of the result

java.lang.RuntimeException
1 frames hidden
android.app.ActivityThread.handleSendResult
383Web pages
1Solution
RuntimeExceptionActivityThread.handleSendResult383

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

java.lang.IllegalStateException
android.view.ViewGroup.addViewInner
368Web pages
IllegalStateExceptionViewGroup.addViewInner368

Changed the data of the ListView, but didn't update the view

java.lang.IllegalStateException
android.widget.ListView.layoutChildren
332Web pages
IllegalStateExceptionListView.layoutChildren332

Posix.open() has thrown an ErrnoException

android.system.ErrnoException
libcore.io.Posix.open
331Web pages
ErrnoExceptionPosix.open331

The application's memory is leaking

java.lang.OutOfMemoryError
android.graphics.Bitmap.nativeCreate
325Web pages
OutOfMemoryErrorBitmap.nativeCreate325

Tried to read from an uninitialized cursor

android.database.CursorIndexOutOfBoundsException
android.database.AbstractCursor.checkPosition
315Web pages
1Solution
CursorIndexOutOfBoundsExceptionAbstractCursor.checkPosition315

Posix.open() has thrown an ErrnoException

libcore.io.ErrnoException
libcore.io.Posix.open
302Web pages
ErrnoExceptionPosix.open302

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

java.lang.IllegalArgumentException
android.view.WindowManagerGlobal.findViewLocked
300Web pages
IllegalArgumentExceptionWindowManagerGlobal.findViewLocked300

Service lifecycle handled incorrectly

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

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 have a problem with the initialization of your Fragment class

android.view.InflateException
android.view.LayoutInflater.createViewFromTag
261Web pages
InflateExceptionLayoutInflater.createViewFromTag261

Tried to log a null reference

java.lang.NullPointerException
android.util.Log.println_native
258Web pages
1Solution
NullPointerExceptionLog.println_native258

Array resource used is missing

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

You got an unhandled exception during activity restore

java.lang.RuntimeException
android.app.ActivityThread.performResumeActivity
253Web pages
RuntimeExceptionActivityThread.performResumeActivity253

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

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
202Web pages
1Solution
FileNotFoundExceptionIoBridge.open202

ArrayList$ArrayListIterator.next() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList$ArrayListIterator.next
198Web pages
ConcurrentModificationExceptionArrayList$ArrayListIterator.next198

You should check the the parameters of your Notification

android.app.RemoteServiceException
android.app.ActivityThread$H.handleMessage
190Web pages
RemoteServiceExceptionActivityThread$H.handleMessage190

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

java.lang.IllegalArgumentException
android.graphics.Bitmap.createBitmap
181Web pages
IllegalArgumentExceptionBitmap.createBitmap181

You must to handle correctly the lifecycle of your Camera object

java.lang.RuntimeException
android.hardware.Camera.native_setParameters
179Web pages
RuntimeExceptionCamera.native_setParameters179

PointerIndex must be greater than 0

java.lang.IllegalArgumentException
android.view.MotionEvent.nativeGetAxisValue
175Web pages
IllegalArgumentExceptionMotionEvent.nativeGetAxisValue175

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

android.util.AndroidRuntimeException
android.app.ContextImpl.startActivity
172Web pages
AndroidRuntimeExceptionContextImpl.startActivity172

StringToReal.invalidReal() has thrown a NumberFormatException

java.lang.NumberFormatException
java.lang.StringToReal.invalidReal
171Web pages
NumberFormatExceptionStringToReal.invalidReal171

You most to open the database, before you try to read or write

java.lang.IllegalStateException
android.database.sqlite.SQLiteClosable.acquireReference
165Web pages
IllegalStateExceptionSQLiteClosable.acquireReference165

Check your Cursor initialization, before use it.

java.lang.IllegalStateException
android.database.CursorWindow.nativeGetString
163Web pages
IllegalStateExceptionCursorWindow.nativeGetString163

You must to check the length of String

java.lang.IndexOutOfBoundsException
android.text.SpannableStringBuilder.checkRange
159Web pages
IndexOutOfBoundsExceptionSpannableStringBuilder.checkRange159

Check your database constraints and SQL statements

android.database.sqlite.SQLiteConstraintException
android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId
159Web pages
SQLiteConstraintExceptionSQLiteConnection.nativeExecuteForLastInsertedRowId159

You are communicating incorrectly between threads

java.lang.IllegalStateException
android.os.MessageQueue.enqueueMessage
157Web pages
IllegalStateExceptionMessageQueue.enqueueMessage157

You try to use a missing asset

java.io.FileNotFoundException
android.content.res.AssetManager.openAsset
151Web pages
FileNotFoundExceptionAssetManager.openAsset151

You have a problem with the initialization of your Service class

java.lang.RuntimeException
android.app.ActivityThread.handleServiceArgs
145Web pages
RuntimeExceptionActivityThread.handleServiceArgs145

BinderProxy.sendDeathNotice() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
3 frames hidden
android.os.BinderProxy.sendDeathNotice
144Web pages
IllegalArgumentExceptionBinderProxy.sendDeathNotice144

You must to handle correctly the lifecycle of your Fragment

java.lang.IllegalStateException
android.app.FragmentManagerImpl.checkStateLoss
143Web pages
IllegalStateExceptionFragmentManagerImpl.checkStateLoss143

You must to update your adapter after data modification

java.lang.IndexOutOfBoundsException
android.support.v7.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition
137Web pages
IndexOutOfBoundsExceptionRecyclerView$Recycler.validateViewHolderForOffsetPosition137

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 are using an unknow method in android:onClick parameter

java.lang.IllegalStateException
android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod
126Web pages
IllegalStateExceptionAppCompatViewInflater$DeclaredOnClickListener.resolveMethod126
Package namePatterns foundSolution coverageSummary coverage
android.app4396
android.view3779
com.android.internal.os3358
android.os2584
android.widget1309
android.content688
android.database.sqlite619
com.android.server.am493
android.support.v7.widget484
android.content.res306
android.support.v7.app265
android.media225
libcore.io224
com.android.server197
android.graphics183
android.database171
android.text141
android.webkit105
java.util96
android.support.design.widget80
android.opengl78
android.util75
android.graphics.drawable72
android.preference68
android.provider64
com.android.server.pm62
com.android.server.wm55
android.net54
android.bluetooth53
android.location50
com.android.volley48
java.lang44
android.content.pm43
com.android.volley.toolbox42
android.animation41
android.hardware39
java.nio39
dalvik.system33
android.telephony31
com.android.internal.util31
android.net.http30
java.net29
android.test25
android.accounts23
com.android.server.net21
com.android.systemui.statusbar21
com.android.systemui.statusbar.phone21
android.view.inputmethod20
android.support.v7.view.menu20
android.speech.tts17
Package nameClass namePatterns foundSolution coverageSummary coverage
com.android.internal.osZygoteInit3163
android.appActivityThread2816
android.viewViewGroup1261
android.osHandlerThread1117
android.viewView1013
android.viewLayoutInflater931
android.osBinder536
android.appActivity476
android.database.sqliteSQLiteDatabase272
com.android.server.amActivityManagerService234
android.osLooper223
android.osHandler213
android.contentContextWrapper200
android.content.resResources190
android.widgetFrameLayout190
android.widgetTextView182
android.contentContentResolver170
android.appFragmentManagerImpl147
android.database.sqliteSQLiteOpenHelper147
android.osParcel147
android.support.v7.appAppCompatActivity142
android.widgetListView139
com.android.internal.osZygoteInit$MethodAndArgsCaller137
android.support.v7.widgetRecyclerView132
android.viewViewRootImpl130
libcore.ioIoBridge127
android.widgetLinearLayout125
android.appContextImpl124
android.contentAbstractThreadedSyncAdapter$SyncThread124
com.android.serverServiceThread124
android.appInstrumentation124
android.support.v7.widgetLinearLayoutManager113
android.appInstrumentation$InstrumentationThread95
android.mediaMediaPlayer95
android.widgetAbsListView92
android.widgetImageView85
android.osAsyncTask82
android.appDialog78
android.webkitWebView76
android.graphicsBitmap73
com.android.server.amActivityStackSupervisor72
android.appApplicationPackageManager71
com.android.server.amActivityStack69
java.utilTimer$TimerImpl66
android.osBundle64
android.viewViewRootImpl$InputStage63
android.openglGLSurfaceView$GLThread62
android.content.resTypedArray62
android.widgetArrayAdapter59
android.textSpannableStringBuilder59
Package nameClass nameMethod namePatterns foundSolution coverage
com.android.internal.osZygoteInitmain3160
android.osHandlerThreadrun1116
android.appActivityThreadmain763
android.appActivityThreadhandleLaunchActivity619
android.osBinderexecTransact527
android.viewLayoutInflaterinflate364
android.viewViewmeasure357
android.appActivityThreadhandleBindApplication356
android.viewViewGrouplayout342
android.appActivityThreadperformLaunchActivity336
android.viewLayoutInflaterrInflate281
android.viewViewGroupdispatchTouchEvent251
android.osLooperloop214
android.viewLayoutInflatercreateViewFromTag171
android.viewViewGroupmeasureChildWithMargins156
android.appActivitysetContentView150
android.osHandlerdispatchMessage140
android.viewViewGroupdispatchDraw137
com.android.internal.osZygoteInit$MethodAndArgsCallerrun137
android.contentAbstractThreadedSyncAdapter$SyncThreadrun124
com.android.serverServiceThreadrun124
android.viewViewdraw117
android.appInstrumentation$InstrumentationThreadrun95
android.widgetFrameLayoutonMeasure94
android.appActivityThreadhandleReceiver88
android.support.v7.appAppCompatActivitysetContentView86
android.appActivityThreadhandleCreateService79
android.appActivityThreaddeliverResults78
android.viewViewlayout75
android.viewViewgetDisplayList75
android.viewLayoutInflaterrInflateChildren73
android.appFragmentManagerImplmoveToState72
android.contentContentResolverquery71
android.viewViewupdateDisplayListIfDirty70
android.appActivityThreadperformResumeActivity66
java.utilTimer$TimerImplrun66
android.appActivityThreadhandleServiceArgs66
android.viewViewperformClick63
android.osAsyncTaskfinish60
android.database.sqliteSQLiteOpenHelpergetWritableDatabase60
android.appActivitystartActivity59
android.appActivitystartActivityForResult58
android.widgetTextView<init>58
android.openglGLSurfaceView$GLThreadrun58
android.support.v7.widgetLinearLayoutManagerfill57
android.widgetTextViewsetText52
android.database.sqliteSQLiteDatabaseopenDatabase51
android.appActivityThread$HhandleMessage51
android.widgetFrameLayoutonLayout50
android.appActivityThreadhandleResumeActivity50
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
com.android.internal.osZygoteInitmainNullPointerException641
com.android.internal.osZygoteInitmainRuntimeException522
com.android.internal.osZygoteInitmainIllegalStateException245
android.viewLayoutInflaterinflateInflateException200
android.appActivityThreadmainNullPointerException182
android.appActivityThreadhandleLaunchActivityRuntimeException177
android.viewLayoutInflaterrInflateInflateException156
android.appActivityThreadmainRuntimeException131
com.android.internal.osZygoteInitmainIllegalArgumentException130
android.appActivityThreadperformLaunchActivityNullPointerException127
android.viewViewmeasureNullPointerException122
android.viewViewGrouplayoutNullPointerException115
com.android.internal.osZygoteInitmainWindowLeaked110
android.appActivitysetContentViewInflateException107
android.osHandlerThreadrunThrowable103
android.osHandlerThreadrunNullPointerException101
android.viewLayoutInflatercreateViewFromTagInflateException99
android.appActivityThreadhandleBindApplicationStrictMode$StrictModeDiskReadViolation96
com.android.internal.osZygoteInitmainStrictMode$StrictModeDiskReadViolation88
android.appActivityThreadmainIllegalStateException85
android.viewViewGroupdispatchTouchEventNullPointerException84
android.osHandlerThreadrunIllegalStateException82
com.android.internal.osZygoteInitmainIntentReceiverLeaked81
android.osBinderexecTransactSecurityException76
android.osHandlerThreadrunSecurityException75
com.android.internal.osZygoteInitmainIndexOutOfBoundsException74
com.android.internal.osZygoteInitmainServiceConnectionLeaked73
android.appActivityThreadperformLaunchActivityRuntimeException71
android.osBinderexecTransactIllegalArgumentException69
android.osHandlerThreadrunRuntimeException67
com.android.internal.osZygoteInitmainFileNotFoundException60
android.viewViewGroupmeasureChildWithMarginsNullPointerException59
android.viewViewmeasureIllegalStateException59
com.android.internal.osZygoteInitmainResources$NotFoundException59
com.android.internal.osZygoteInitmainClassCastException59
com.android.internal.osZygoteInitmainThrowable56
android.osHandlerThreadrunFileNotFoundException54
android.viewViewGrouplayoutIllegalStateException52
android.viewViewGrouplayoutIndexOutOfBoundsException52
android.appActivityThreadhandleLaunchActivityNullPointerException48
android.viewViewmeasureClassCastException48
com.android.internal.osZygoteInitmainNoSuchMethodException48
android.osHandlerThreadrunIOException48
android.appActivityThreadmainIllegalArgumentException47
com.android.internal.osZygoteInitmainNumberFormatException47
com.android.internal.osZygoteInitmainJSONException46
android.osBinderexecTransactNullPointerException45
android.appActivityThreaddeliverResultsNullPointerException44
android.osBinderexecTransactRuntimeException44
com.android.internal.osZygoteInitmainOutOfMemoryError44