arduino/Arduino · error · IOException

'arch' folder is no longer supported! See http://goo.gl/gfFJ

Error message

'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information

What it means

UserLibrary.create() validates the folder layout of an Arduino 1.5-format library. Arduino IDE 1.5 rev.1 libraries placed source code inside an 'arch' subfolder; this layout was abandoned and the loader now hard-fails when libFolder/arch is a directory. It exists to force migration to the recursive 'src' layout.

Source

Thrown at arduino-core/src/processing/app/packages/UserLibrary.java:92

    // Parse metadata
    File propertiesFile = new File(libFolder, "library.properties");
    PreferencesMap properties = new PreferencesMap();
    properties.load(propertiesFile);

    // Library sanity checks
    // ---------------------

    // Compatibility with 1.5 rev.1 libraries:
    // "email" field changed to "maintainer"
    if (!properties.containsKey("maintainer") && properties.containsKey("email")) {
      properties.put("maintainer", properties.get("email"));
    }

    // Compatibility with 1.5 rev.1 libraries:
    // "arch" folder no longer supported
    File archFolder = new File(libFolder, "arch");
    if (archFolder.isDirectory())
      throw new IOException("'arch' folder is no longer supported! See http://goo.gl/gfFJzU for more information");

    // Check mandatory properties
    for (String p : Constants.LIBRARY_MANDATORY_PROPERTIES)
      if (!properties.containsKey(p))
        throw new IOException("Missing '" + p + "' from library");

    // Check layout
    LibraryLayout layout;
    File srcFolder = new File(libFolder, "src");

    if (srcFolder.exists() && srcFolder.isDirectory()) {
      // Layout with a single "src" folder and recursive compilation
      layout = LibraryLayout.RECURSIVE;
    } else {
      // Layout with source code on library's root and "utility" folders
      layout = LibraryLayout.FLAT;
    }

View on GitHub (pinned to a0df6e0e83)

Solutions

  1. Migrate the library to the recursive layout: move the platform-specific sources from arch/<platform>/ into src/ (optionally qualifying filenames or using src/<platform> folders)
  2. Upgrade the library to a newer release that no longer uses the 'arch' folder
  3. If you maintain the library, restructure its folders per the 1.5 library spec linked in the message and re-release
  4. If the library is abandoned, rewrite or vendor the needed sources in a src/ folder yourself

Example fix

// before (1.5 rev.1 layout)
MyLib/
  arch/
    avr/MyLib.cpp
// after (recursive layout)
MyLib/
  src/
    MyLib.cpp
Defensive patterns

Strategy: validation

Validate before calling

File arch = new File(libFolder, "arch");
if (arch.isDirectory()) { /* migrate arch/ contents into src/ before loading */ }

Type guard

boolean isLegacyArchLayout(File dir) {
  return dir != null && dir.isDirectory() && new File(dir, "arch").isDirectory();
}

Try / catch

try {
  UserLibrary lib = UserLibrary.create(libFolder);
} catch (IOException e) {
  if (e.getMessage().contains("arch")) { /* migrate or flag legacy library */ }
}

Prevention

When it happens

Trigger: Calling UserLibrary.create(libFolder) on a library directory that contains an 'arch' subdirectory (File(libFolder, "arch").isDirectory() == true).

Common situations: Installing an old 1.5 rev.1-era third-party library into the Arduino libraries folder (e.g. under sketchbook/libraries) and compiling or importing it with a modern IDE; unzipping an ancient library release.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of arduino/Arduino@a0df6e0e83 (2026-09-06). Data as JSON: /api/errors/6d6bfb2e2560eacd. Report an issue: GitHub.