Error map

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

Android · layer 1, On your device

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). 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.

Android resource linking failed — AAPT: error: resource x (aka y) not found — Android resource linking failed (Android)Android res…Unsupported class file major version — Gradle: Unsupported class file major version / Android Gradle plugin requires Java 17 to run (Android)Unsupported class f…Could not resolve — Gradle: Could not resolve all files for configuration / Could not resolve dependency (Android)Could not resolveManifest merger failed — Manifest merger failed: android:exported needs to be explicitly specified (Android)Manifest merger fai…Gradle wrapper main class — Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain (Java)Gradle wrapper main…incompatible version of Kotlin — Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.0.0, expected version is 1.8.0 (Android)incompatible versio…CalledFromWrongThreadException — CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views (Android)CalledFromWrongThre…BadTokenException — WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? (Android)BadTokenExceptionVersion code has already been used — Play Console: Version code 1 has already been used. Try another version code (Android)Version code has al…Failed to find target with hash string — Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted (Android)Failed to find targ…Cannot fit requested classes in a single dex file — Cannot fit requested classes in a single dex file (# methods: 65536 > 65536) — mergeDex failed (Android)Cannot fit requeste…Can not perform this action after onSaveInstanceState — IllegalStateException: Can not perform this action after onSaveInstanceState (fragment transaction) (Android)Can not perform thi…Fragment not attached to a context — IllegalStateException: Fragment x not attached to a context / not attached to an activity (Android)Fragment not attach…ClassNotFoundException — java.lang.ClassNotFoundException / NoClassDefFoundError (Java)ClassNotFoundExcept…Duplicate class — Duplicate class X found in modules A and B (Android)Duplicate classUnsupportedClassVersionError — java.lang.UnsupportedClassVersionError: class file version 61.0, this version of the Java Runtime only recognizes up to 55.0 (Java)UnsupportedClassVer…INSTALL_FAILED_UPDATE_INCOMPATIBLE — Android: INSTALL_FAILED_UPDATE_INCOMPATIBLE (Android)INSTALL_FAILED_UPDA…CocoaPods compatible versions — CocoaPods could not find compatible versions for pod (iOS)CocoaPods compatibl…NoSuchMethodError — java.lang.NoSuchMethodError (Java)NoSuchMethodErrorNamespace not specified — Namespace not specified. Specify a namespace in the module's build file (AGP 8) (Android)Namespace not speci…android:attr/lStar not found — AAPT: error: resource android:attr/lStar not found (Android)android:attr/lStar …ActivityNotFoundException — ActivityNotFoundException: Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml? (Android)ActivityNotFoundExc…ELIFECYCLE — npm ERR! code ELIFECYCLE / Command failed with exit code 1 (npm)ELIFECYCLECOPY failed — COPY failed: file not found in build context / "/app/x": not found (Docker)COPY failedERR_OSSL_EVP_UNSUPPORTED — Error: error:0308010C:digital envelope routines::unsupported (Node.js)ERR_OSSL_EVP_UNSUPP…caching_sha2_password — Authentication plugin 'caching_sha2_password' cannot be loaded (MySQL)caching_sha2_passwo…old lockfile — npm WARN old lockfile — The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched (npm)old lockfilecb() never called — npm ERR! cb() never called! (npm)cb() never calledNetworkOnMainThreadException — android.os.NetworkOnMainThreadException (Android)NetworkOnMainThread…ANR — ANR: Application Not Responding (Input dispatching timed out) (Android)ANRCannot access database on the main thread — Room: Cannot access database on the main thread since it may potentially lock the UI for a long period of time (Android)Cannot access datab…An unhandled error has occurred — Blazor: An unhandled error has occurred. Reload 🗙 (.NET)An unhandled error …setState() called after dispose() — Flutter: setState() called after dispose(): _MyState#1a2b3 (lifecycle state: defunct, not mounted) (Flutter / Dart)setState() called a…adb unauthorized — adb: device unauthorized. This adb server's $ADB_VENDOR_KEYS is not set (Android)adb unauthorizedR8: Missing class — ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules (missing_rules.txt) (Android)R8: Missing classsigned in debug mode — Play Console: You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode (Android)signed in debug modeshallow update not allowed — ! [remote rejected] main -> main (shallow update not allowed) (Git)shallow update not …github-actions[bot] 403 — remote: Permission to owner/repo.git denied to github-actions[bot]. fatal: unable to access … The requested URL returned error: 403 (Git)github-actions[bot]…npm ci out of sync — npm ERR! `npm ci` can only install packages when your package.json and package-lock.json are in sync (npm)npm ci out of syncSDK location not found — SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in local.properties (Android)SDK location not fo…Minimum supported Gradle version — Minimum supported Gradle version is 8.7. Current version is 8.2 (Android)Minimum supported G…Dependency requires compileSdk — Dependency 'androidx.x:1.y' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs (Android)Dependency requires…no devices/emulators found — adb: no devices/emulators found / error: device not found (Android)no devices/emulator…

Directly related (12)

Unsupported class file major versionAndroid

Gradle: Unsupported class file major version / Android Gradle plugin requires Java 17 to run

The JDK running Gradle doesn’t match what the Gradle version or Android Gradle Plugin (AGP) supports.

Could not resolveAndroid

Gradle: Could not resolve all files for configuration / Could not resolve dependency

Gradle couldn’t download a dependency — wrong coordinates/version, missing repository, offline mode, or network/proxy issues.

Manifest merger failedAndroid

Manifest merger failed: android:exported needs to be explicitly specified

Targeting Android 12 (API 31)+ requires `android:exported` on every activity, service or receiver that has an intent-filter.

Gradle wrapper main classJava

Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

The Gradle wrapper JAR (gradle/wrapper/gradle-wrapper.jar) is missing or corrupt.

incompatible version of KotlinAndroid

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.0.0, expected version is 1.8.0

A dependency was compiled with a newer Kotlin version than your project’s Kotlin Gradle plugin can read.

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.

BadTokenExceptionAndroid

WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

A dialog or popup was shown with a context whose Activity is finishing/destroyed, or with the Application context.

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).

Failed to find target with hash stringAndroid

Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted

Gradle needs an SDK platform/build-tools that isn’t installed, or the licences haven’t been accepted on this machine.

Cannot fit requested classes in a single dex fileAndroid

Cannot fit requested classes in a single dex file (# methods: 65536 > 65536) — mergeDex failed

The app exceeds the 64K method reference limit of a single DEX file and multidex isn’t enabled (minSdk below 21).

Can not perform this action after onSaveInstanceStateAndroid

IllegalStateException: Can not perform this action after onSaveInstanceState (fragment transaction)

A FragmentTransaction (or DialogFragment.show/navigation) ran after the Activity saved its state, typically from an async callbac…

Fragment not attached to a contextAndroid

IllegalStateException: Fragment x not attached to a context / not attached to an activity

Code called requireContext()/requireActivity()/getString() after the Fragment was detached — usually in an async callback.

Two steps away (30)

ClassNotFoundExceptionJava

java.lang.ClassNotFoundException / NoClassDefFoundError

The JVM couldn’t find a class on the classpath at runtime.

Duplicate classAndroid

Duplicate class X found in modules A and B

Two dependencies ship the same class — typically old Android Support libraries mixed with AndroidX, or Kotlin stdlib-jdk7/jdk8 ve…

UnsupportedClassVersionErrorJava

java.lang.UnsupportedClassVersionError: class file version 61.0, this version of the Java Runtime only recognizes up to 55.0

Code compiled for a newer Java version is running on an older JVM.

INSTALL_FAILED_UPDATE_INCOMPATIBLEAndroid

Android: INSTALL_FAILED_UPDATE_INCOMPATIBLE

An app with the same package name but a different signing key is already installed on the device.

CocoaPods compatible versionsiOS

CocoaPods could not find compatible versions for pod

pod install can’t satisfy the version constraints — outdated spec repo, a higher deployment target required, or two pods needing…

NoSuchMethodErrorJava

java.lang.NoSuchMethodError

Code compiled against one version of a library is running with another version where the method doesn’t exist.

Namespace not specifiedAndroid

Namespace not specified. Specify a namespace in the module's build file (AGP 8)

AGP 8 requires android { namespace = "…" } in each module’s build file; the package attribute in AndroidManifest.xml is no longer…

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…

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.

ELIFECYCLEnpm

npm ERR! code ELIFECYCLE / Command failed with exit code 1

An npm script (build, start, test, postinstall) exited with an error. ELIFECYCLE is only the wrapper — the real error is printed…

COPY failedDocker

COPY failed: file not found in build context / "/app/x": not found

The Dockerfile COPY refers to a path outside the build context, excluded by .dockerignore, or relative to the wrong directory.

ERR_OSSL_EVP_UNSUPPORTEDNode.js

Error: error:0308010C:digital envelope routines::unsupported

An old build tool (webpack 4, old react-scripts) uses a hash algorithm that OpenSSL 3 in Node 17+ disables.

caching_sha2_passwordMySQL

Authentication plugin 'caching_sha2_password' cannot be loaded

An old MySQL client/driver can’t use MySQL 8’s default authentication plugin.

old lockfilenpm

npm WARN old lockfile — The package-lock.json file was created with an old version of npm, so supplemental metadata must be fetched

The lockfile is lockfileVersion 1 (npm 6) and npm 7+ is upgrading it.

cb() never callednpm

npm ERR! cb() never called!

An old npm crash during install — usually network/cache corruption.

NetworkOnMainThreadExceptionAndroid

android.os.NetworkOnMainThreadException

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

ANRAndroid

ANR: Application Not Responding (Input dispatching timed out)

The main thread was blocked for about 5 seconds (input) or a broadcast/service took too long, so Android showed “App isn’t respon…

Cannot access database on the main threadAndroid

Room: Cannot access database on the main thread since it may potentially lock the UI for a long period of time

A Room DAO query ran on the main thread; Room forbids it by default.

An unhandled error has occurred.NET

Blazor: An unhandled error has occurred. Reload 🗙

A Blazor component threw an exception; Blazor Server tears down the circuit (or WebAssembly logs to the console) and shows the re…

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.

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.

R8: Missing classAndroid

ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules (missing_rules.txt)

R8 (minification) found references to classes that aren’t on the classpath, typically optional dependencies of a library.

signed in debug modeAndroid

Play Console: You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode

The bundle was signed with the debug keystore; Play only accepts release-signed uploads.

shallow update not allowedGit

! [remote rejected] main -> main (shallow update not allowed)

You pushed from a shallow clone to a remote that doesn’t accept shallow history.

github-actions[bot] 403Git

remote: Permission to owner/repo.git denied to github-actions[bot]. fatal: unable to access … The requested URL returned error: 403

A GitHub Actions workflow tried to push but the GITHUB_TOKEN doesn’t have write permission.

npm ci out of syncnpm

npm ERR! `npm ci` can only install packages when your package.json and package-lock.json are in sync

package-lock.json doesn’t match package.json, so npm ci refuses to install.

SDK location not foundAndroid

SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in local.properties

Gradle doesn’t know where the Android SDK is installed.

Minimum supported Gradle versionAndroid

Minimum supported Gradle version is 8.7. Current version is 8.2

The Android Gradle Plugin (AGP) version in your build needs a newer Gradle wrapper version.

Dependency requires compileSdkAndroid

Dependency 'androidx.x:1.y' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs

A library needs a higher compileSdk than your module uses (checkAarMetadata task).

no devices/emulators foundAndroid

adb: no devices/emulators found / error: device not found

adb can’t see any connected device or running emulator.