pxb1988/dex2jar · error · RuntimeException
Can't read line:
Error message
Can't read line:
What it means
DecryptStringCmd.build() parses config lines of the form `Lowner;->name(desc)ret`. If the line contains no `->` separator it cannot be parsed as a method reference, so it throws this RuntimeException.
Solutions
- Fix the offending line to use the `owner->name(descriptor)ReturnType` format
- Strip comments/blank lines from the config file before passing it
- Example valid line: Lcom/foo/Bar;->decrypt(Ljava/lang/String;)Ljava/lang/String;
Example fix
// before com.foo.Bar.decrypt(java.lang.String) // after Lcom/foo/Bar;->decrypt(Ljava/lang/String;)Ljava/lang/String;
Defensive patterns
Strategy: validation
Validate before calling
boolean validLine = line.contains("->") && line.indexOf('(', line.indexOf("->")) > 0;
if (!validLine) skipOrLog(line); Try / catch
try { MethodConfig c = build(line); } catch (RuntimeException e) { if (e.getMessage().startsWith("Can't read line:")) { log.warn("Skipping malformed config line: " + line); } else throw e; } Prevention
- Always format config lines as Lowner;->name(desc)Ret
- Strip comments and blank lines from config files
- Lint config files with a regex like `L[^;]+;->[^ (]+\(` before running
When it happens
Trigger: A config line (from -c/--config file or built from -t/--arg-types input) missing the `->` separator, e.g. a blank-ish, commented, or free-form line fed to the config parser.
Common situations: Malformed lines in a method-config file (trailing comments, using `.` instead of `->`, blank lines with stray characters).
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- can't convert [ ] to type
- ERROR: Unrecognized option
- ERROR: Option need an argument value
- can't find method
AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08).
Data as JSON: /api/errors/250e4298f6697fe6.
Report an issue: GitHub.
Appendix: source
Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/DecryptStringCmd.java:127
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (owner == null) {
if (other.owner != null)
return false;
} else if (!owner.equals(other.owner))
return false;
return true;
}
}
MethodConfig build(String line) {
int idx = line.indexOf("->");
if (idx < 0) {
throw new RuntimeException("Can't read line:" + line);
}
String owner = line.substring(0, idx);
if (owner.startsWith("L") && owner.endsWith(";")) {
owner = owner.substring(1, owner.length() - 1);
}
int idx2 = line.indexOf('(', idx);
if (idx2 < 0) {
throw new RuntimeException("Can't read line:" + line);
}
String name = line.substring(idx + 2, idx2);
String desc = line.substring(idx2);
if (desc.endsWith(")")) {
desc = desc + "Ljava/lang/String;";
}View on GitHub (pinned to b5bda4fb49)