0

When building my app I get this error:

Error:Execution failed for task ':app:transformClasses_enhancedWithInstant+reloadDexForDebug'.
java.io.IOException: Invalid incremental change record : CHANGED,C:\Users\gingo\Documents\Dropbox (SKOUMAL, s.r.o.)\work\myproject\MyProject\app\build\intermediates\transforms\instantRun\debug\folders\4000\5\enhanced\com\android\tools\fd\runtime\AppPatchesLoaderImpl.class

The only way to get rid of it is Build -> Rebuild project.

user
  • 86,916
  • 18
  • 197
  • 190
gingo
  • 3,149
  • 1
  • 23
  • 32

1 Answers1

1

The culprit is , (comma) in project path. Simply remove it and you are good to go.

Let me explain it little bit deeply. The reason could be found in ChangeRecords.java file. In method load(File file) it parses some change records from file and it uses , (comma) as divider for line-fields. See the whole code of method:

/**
 * Load change records from a persisted file.
 */
@NonNull
static ChangeRecords load(File file) throws IOException {
    ChangeRecords changeRecords = new ChangeRecords();
    List<String> rawRecords = Files.readLines(file, Charsets.UTF_8);
    for (String rawRecord : rawRecords) {
        StringTokenizer st = new StringTokenizer(rawRecord, ",");
        if (st.countTokens() != 2) {
            throw new IOException("Invalid incremental change record : " + rawRecord);
        }
        changeRecords.add(Status.valueOf(st.nextToken()), st.nextToken());
    }
    return changeRecords;
}
gingo
  • 3,149
  • 1
  • 23
  • 32