Free Support Forum - aspose.com

Aspose.Tasks.java

java.lang.UnsupportedOperationException: The operation is not allowed in evaluation mode. 在进行创建mpp文件时出现问题

代码

//asposeTask
public static void asposeTaskTest() throws IOException{
String path = “D:/EXPORT/test.mpp”;
Calendar cal = Calendar.getInstance();
cal.set(2017, 8, 1);
//Create a project instance
Project project = new Project();
Task task1 = project.getRootTask().getChildren().add(“Task1”);
task1.set(Tsk.START,cal.getTime());
task1.set(Tsk.FINISH, cal.getTime());
task1.set(Tsk.UID, 1);
project.save(path, SaveFileFormat.MPP);
}

@asdDFFD

我建议您尝试使用最新的Java 20.8 Aspose.Tasks。 如果仍然有问题,请共享源MPP文件,以便最终解决该问题。