{"record":{"id":"13fa44acde79519b","repo":"skylot/jadx","slug":"can-t-decode-value","errorCode":null,"errorMessage":"Can't decode value: ","messagePattern":"Can't decode value: ","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"warning","filePath":"jadx-core/src/main/java/jadx/core/codegen/AnnotationGen.java","lineNumber":219,"sourceCode":"\t\t\t\tbreak;\n\t\t\tcase ENCODED_ARRAY:\n\t\t\t\tcode.add('{');\n\t\t\t\tIterator<?> it = ((Iterable<?>) value).iterator();\n\t\t\t\twhile (it.hasNext()) {\n\t\t\t\t\tEncodedValue v = (EncodedValue) it.next();\n\t\t\t\t\tencodeValue(cls.root(), code, v);\n\t\t\t\t\tif (it.hasNext()) {\n\t\t\t\t\t\tcode.add(\", \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcode.add('}');\n\t\t\t\tbreak;\n\t\t\tcase ENCODED_ANNOTATION:\n\t\t\t\tformatAnnotation(code, (IAnnotation) value);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new JadxRuntimeException(\"Can't decode value: \" + encodedValue.getType() + \" (\" + encodedValue + ')');\n\t\t}\n\t}\n\n\tprivate StringUtils getStringUtils() {\n\t\treturn cls.root().getStringUtils();\n\t}\n}\n","sourceCodeStart":201,"sourceCodeEnd":227,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/codegen/AnnotationGen.java#L201-L227","documentation":"Thrown by AnnotationGen.encodeValue() as the default branch of the switch on encodedValue.getType(). All known EncodedValueType values (ENCODED_NULL through ENCODED_ANNOTATION) are handled; reaching the default means an unrecognized encoded value type was encountered. This indicates either a corrupted DEX annotation or a future DEX format extension.","triggerScenarios":"Processing a DEX file whose annotation contains an encoded value type constant not in the known set. Corrupted annotation data or a novel obfuscation technique that produces non-standard encoded value tags.","commonSituations":"Heavily obfuscated APKs with modified DEX structures. DEX files produced by non-standard compilers or post-processing tools.","solutions":["Update jadx to the latest version — newer releases may handle additional encoded value types.","Report the offending DEX file as a test case to the jadx issue tracker.","Exclude the affected class or use fallback decompilation mode to skip annotation generation."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    annotationGen.encodeValue(root, code, encodedValue);\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().startsWith(\"Can't decode value\")) {\n        // Fallback: emit the raw encoded value as a comment\n        code.add(\"/* unsupported annotation value type: \" + encodedValue.getType() + \" */\");\n        logger.warn(\"Unsupported annotation encoded value type\", e);\n    } else {\n        throw e;\n    }\n}","preventionTips":["Update jadx to handle newer DEX annotation value types.","Use fallback mode for obfuscated or non-standard DEX files.","Report the DEX file as a test case to the jadx project."],"tags":["codegen","annotation","dex","unknown-format"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}