public static void prepareProjectPanel(ProjectPanel panel) { BatchPack pack = panel.getProjectBatch(); if (pack.isLibrary() || pack.isDebugMode()) return; AndroidProject project = pack.getAttributes().getAndroidProject(); ArrayList<String> libPaths = PackManager.getRelativeLibraryPaths(project.projectPath); for (String libPath : libPaths) { String configer = Files.readTextFile(new File(project.projectPath, "project.properties"), true); String keyName = new File(libPath).getName(); String libraryPath = publicLibraries.get(keyName); if (libraryPath == null) { System.err.println("error: not found dependency library " + keyName); continue; } libraryPath = Files.convert2AbsolutePath("", libraryPath); try { String relativePath = Files.toRelativePath(new File(project.projectPath), new File(libraryPath)); configer = configer.replace(libPath, relativePath); Files.saveTextFile(new File(project.projectPath, "project.properties"), configer); } catch (IOException e) { e.printStackTrace(); } } }