Error map

Method not mocked in local unit test java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked.

Android · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (10). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

Method not mocked in local unit test — java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. (Android)Method not …A Timer is still pending even after the widget tree was disposed — Flutter test: A Timer is still pending even after the widget tree was disposed (Flutter / Dart)A Timer is still pe…CalledFromWrongThreadException — CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views (Android)CalledFromWrongThre…Expected: exactly one matching candidate, Actual: found 0 widgets — Flutter test: Expected: exactly one matching candidate Actual: _TextFinder:<Found 0 widgets with text "Hello"> (Flutter / Dart)Expected: exactly o…AmbiguousViewMatcherException: matches multiple views — androidx.test.espresso.AmbiguousViewMatcherException: 'with id: com.example:id/title' matches multiple views in the hierarchy (Android)AmbiguousViewMatche…INSTRUMENTATION_FAILED: Unable to find instrumentation info — android.util.AndroidException: INSTRUMENTATION_FAILED: com.example.test/androidx.test.runner.AndroidJUnitRunner (Android)INSTRUMENTATION_FAI…UI Testing Failure: Failed to launch / Timed out waiting for UI — XCTestCase failed: "Failed to get matching snapshot: Unable to find hit point for element" (iOS)UI Testing Failure:…Test crashed with signal / Test host failed to launch — The test runner hung before establishing connection / Early unexpected exit, operation never finished bootstrapping (iOS)Test crashed with s…Module with the Main dispatcher is missing — IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used (Android)Module with the Mai…Play Console: 12 testers for 14 days before production — You need to run a closed test with at least 12 testers for 14 days (Android)Play Console: 12 te…NoMatchingViewException: No views in hierarchy found matching — androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with id: com.example:id/submit (Android)NoMatchingViewExcep…setState() called after dispose() — Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted) (Flutter / Dart)setState() called a…BoxConstraints forces an infinite width — Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row) (Flutter / Dart)BoxConstraints forc…Cleartext HTTP traffic not permitted — Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted (Flutter / Dart)Cleartext HTTP traf…android:attr/lStar not found — AAPT: error: resource android:attr/lStar not found (Android)android:attr/lStar …Android resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android resource li…NetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…No Material widget found — Flutter: No Material widget found. TextField widgets require a Material widget ancestor (Flutter / Dart)No Material widget …MediaQuery.of() called with a context that does not contain a MediaQuery — Flutter: MediaQuery.of() called with a context that does not contain a MediaQuery (Flutter / Dart)MediaQuery.of() cal…Android license status unknown / licenses not accepted — flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses (Flutter / Dart)Android license sta…RecyclerView: Inconsistency detected. Invalid item position — java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 4(offset:4).state:10 (Android)RecyclerView: Incon…adb unauthorized — adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set (Android)adb unauthorizedINSTALL_FAILED_VERSION_DOWNGRADE — Failure [INSTALL_FAILED_VERSION_DOWNGRADE] (Android)INSTALL_FAILED_VERS…INSTALL_FAILED_DUPLICATE_PERMISSION — Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.example.permission.C2D_MESSAGE pkg=com.example.old] (Android)INSTALL_FAILED_DUPL…Unable to boot the Simulator / Failed to boot simulator — Unable to boot device because it cannot be located on disk / Domain=NSPOSIXErrorDomain Code=60 Operation timed out (iOS)Unable to boot the …Core Data: NSManagedObjectContext was accessed from the wrong queue — CoreData: error: Serious application error. Exception was caught during Core Data change processing (iOS)Core Data: NSManage…App Review Guideline 2.1: App Completeness — Guideline 2.1 - Performance - App Completeness: We discovered one or more bugs in your app (iOS)App Review Guidelin…EXC_BAD_INSTRUCTION: Fatal error arithmetic overflow — Thread 1: Fatal error: Arithmetic operation '255 + 1' (on type 'UInt8') results in an overflow (iOS)EXC_BAD_INSTRUCTION…Error building the app bundle — Execution failed for task ':app:bundleRelease'. Error while executing bundletool (Android)Error building the …JobCancellationException: StandaloneCoroutine was cancelled — kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job=StandaloneCoroutine{Cancelling}@a1b2c3 (Android)JobCancellationExce…AsyncTask deprecated / Handler() deprecated — 'AsyncTask<Params!, Progress!, Result!>' is deprecated. Deprecated in Java (Android)AsyncTask deprecate…Version code has already been used — Play Console: Version code 1 has already been used. Try another version code (Android)Version code has al…must target at least API level — Play Console: Your app currently targets API level 33 and must target at least API level 34 (Android)must target at leas…Play Billing: DEVELOPER_ERROR (5) — BillingResponseCode.DEVELOPER_ERROR: Invalid arguments provided to the API (Android)Play Billing: DEVEL…ActivityNotFoundException — ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml? (Android)ActivityNotFoundExc…NullPointerException: Attempt to invoke virtual method on a null object reference — java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference (Android)NullPointerExceptio…ClassCastException: cannot be cast to android.widget — java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView (Android)ClassCastException:…

Directly related (10)

A Timer is still pending even after the widget tree was disposedFlutter / Dart

Flutter test: A Timer is still pending even after the widget tree was disposed

A widget test finished while a `Timer` or delayed `Future` was still scheduled.

CalledFromWrongThreadExceptionAndroid

CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views

Background code updated a View directly; UI changes must happen on the main thread.

Expected: exactly one matching candidate, Actual: found 0 widgetsFlutter / Dart

Flutter test: Expected: exactly one matching candidate Actual: _TextFinder:<Found 0 widgets with text "Hello">

A widget test looked for a widget that is not currently in the tree.

AmbiguousViewMatcherException: matches multiple viewsAndroid

androidx.test.espresso.AmbiguousViewMatcherException: 'with id: com.example:id/title' matches multiple views in the hierarchy

More than one view matches the Espresso matcher.

INSTRUMENTATION_FAILED: Unable to find instrumentation infoAndroid

android.util.AndroidException: INSTRUMENTATION_FAILED: com.example.test/androidx.test.runner.AndroidJUnitRunner

The test APK can't start the instrumentation on the device.

UI Testing Failure: Failed to launch / Timed out waiting for UIiOS

XCTestCase failed: "Failed to get matching snapshot: Unable to find hit point for element"

An XCUITest couldn't interact with the element.

Test crashed with signal / Test host failed to launchiOS

The test runner hung before establishing connection / Early unexpected exit, operation never finished bootstrapping

The test host app crashed before tests started.

Module with the Main dispatcher is missingAndroid

IllegalStateException: Module with the Main dispatcher had failed to initialize. For tests Dispatchers.setMain from kotlinx-coroutines-test module can be used

`Dispatchers.Main` was used in a unit test without a test dispatcher.

Play Console: 12 testers for 14 days before productionAndroid

You need to run a closed test with at least 12 testers for 14 days

New personal developer accounts must run a closed test before applying for production.

NoMatchingViewException: No views in hierarchy found matchingAndroid

androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with id: com.example:id/submit

An Espresso test looked for a view that isn't on screen yet.

Two steps away (26)

setState() called after dispose()Flutter / Dart

Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted)

An async callback (network, timer, stream) finished after the widget was removed and then called setState.

BoxConstraints forces an infinite widthFlutter / Dart

Flutter: BoxConstraints forces an infinite width. These invalid constraints were provided to RenderStack's layout() function (TextField in a Row)

A widget that needs a finite width, like a `TextField` or `Container` with no size, was placed where the parent offers unlimited…

Cleartext HTTP traffic not permittedFlutter / Dart

Flutter (Android): java.io.IOException: Cleartext HTTP traffic to api.example.com not permitted

Android 9+ blocks plain `http://` requests by default; the app must use HTTPS or explicitly allow cleartext for that host.

android:attr/lStar not foundAndroid

AAPT: error: resource android:attr/lStar not found

A dependency (androidx.core 1.7+) uses an attribute from Android 12 (API 31), but your module compiles against an older compileSd…

Android resource linking failedAndroid

AAPT: error: resource x (aka y) not found — Android resource linking failed

A layout, manifest or style references a resource (drawable, string, style, attribute) that doesn’t exist in the module or its de…

NetworkOnMainThreadExceptionAndroid

android.os.NetworkOnMainThreadException

The app made a network call on the main (UI) thread, which Android forbids.

No Material widget foundFlutter / Dart

Flutter: No Material widget found. TextField widgets require a Material widget ancestor

A Material-design widget (TextField, ListTile, InkWell, Chip) was placed outside a `Scaffold`, `Material` or `Card`, so it has no…

MediaQuery.of() called with a context that does not contain a MediaQueryFlutter / Dart

Flutter: MediaQuery.of() called with a context that does not contain a MediaQuery

Code asked for screen size or theme data using a context that has no MediaQuery ancestor, usually above or outside `MaterialApp`.

Android license status unknown / licenses not acceptedFlutter / Dart

flutter doctor: Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses

The Android SDK licenses have not been accepted, so builds cannot download or use SDK components.

RecyclerView: Inconsistency detected. Invalid item positionAndroid

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 4(offset:4).state:10

The adapter's data changed without the right notify call while RecyclerView was laying out.

adb unauthorizedAndroid

adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set

The phone hasn’t accepted your computer’s RSA key for USB debugging yet.

INSTALL_FAILED_VERSION_DOWNGRADEAndroid

Failure [INSTALL_FAILED_VERSION_DOWNGRADE]

You are installing an APK with a lower versionCode than the one on the device.

INSTALL_FAILED_DUPLICATE_PERMISSIONAndroid

Failure [INSTALL_FAILED_DUPLICATE_PERMISSION perm=com.example.permission.C2D_MESSAGE pkg=com.example.old]

Another installed app already declares the same custom permission.

Unable to boot the Simulator / Failed to boot simulatoriOS

Unable to boot device because it cannot be located on disk / Domain=NSPOSIXErrorDomain Code=60 Operation timed out

The iOS Simulator device can't start.

Core Data: NSManagedObjectContext was accessed from the wrong queueiOS

CoreData: error: Serious application error. Exception was caught during Core Data change processing

A managed object or context was used on a different thread than it belongs to.

App Review Guideline 2.1: App CompletenessiOS

Guideline 2.1 - Performance - App Completeness: We discovered one or more bugs in your app

Review found crashes or broken features.

EXC_BAD_INSTRUCTION: Fatal error arithmetic overflowiOS

Thread 1: Fatal error: Arithmetic operation '255 + 1' (on type 'UInt8') results in an overflow

Swift traps on integer overflow instead of wrapping.

Error building the app bundleAndroid

Execution failed for task ':app:bundleRelease'. Error while executing bundletool

Building the Android App Bundle (.aab) failed in the bundle step.

JobCancellationException: StandaloneCoroutine was cancelledAndroid

kotlinx.coroutines.JobCancellationException: StandaloneCoroutine was cancelled; job=StandaloneCoroutine{Cancelling}@a1b2c3

A coroutine was cancelled, usually because its scope ended.

AsyncTask deprecated / Handler() deprecatedAndroid

'AsyncTask<Params!, Progress!, Result!>' is deprecated. Deprecated in Java

AsyncTask is removed from the recommended APIs.

Version code has already been usedAndroid

Play Console: Version code 1 has already been used. Try another version code

Every upload to a Play app needs a higher versionCode than any previous upload (in any track).

must target at least API levelAndroid

Play Console: Your app currently targets API level 33 and must target at least API level 34

Google Play requires new apps and updates to target a recent Android API level (raised every year).

Play Billing: DEVELOPER_ERROR (5)Android

BillingResponseCode.DEVELOPER_ERROR: Invalid arguments provided to the API

The billing call used invalid arguments or an app Play doesn't recognise.

ActivityNotFoundExceptionAndroid

ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml?

An Intent targets an Activity that isn’t declared in the manifest, or an implicit intent has no app to handle it.

NullPointerException: Attempt to invoke virtual method on a null object referenceAndroid

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference

Code called a method on a view or object that was null, most often a findViewById that returned null.

ClassCastException: cannot be cast to android.widgetAndroid

java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.TextView

A view id in the layout is a different widget type than the one the code expects.