Answer the question
In order to leave comments, you need to log in
Reading MS Project MPP/MPX under Android 5+?
Beaver everyone.
There is an MPXJ project in Java for importing all project files of all versions, but the trouble is that for .mpp files older than the xs version, it is called 2000-2003 .mpp, for older files awt.Color is used, which is not in the android environment and that's it crashes with NoClassDefFoundError: Failed resolution of: Ljava/awt/Color;
MPPReader reader = new MPPReader();
String path2file = context.getFilesDir() + "/" +SAMPLE21_MPPX;
ProjectFile projectFile = reader.read(path2file); <-- тута мы падаем
Answer the question
In order to leave comments, you need to log in
The solution turned out to be simple
- open the project in the studio https://github.com/centic9/poi-on-android
- add build.gradle (Module: poishadow)
compile 'org.apache.poi:poi-ooxml:3.17' to the lines
compile 'com.fasterxml:aalto-xml:1.0.0'
string including MPXJ
// https://mvnrepository.com/artifact/net.sf.mpxj/mpxj
compile group: 'net.sf.mpxj', name: ' mpxj', version: '7.2.1'
- then when compiling the project, the \poi-on-android-master\poishadow\build\libs\poishadow-all.jar file will be created
and at some stage everything will hang, but the file can be take and connect to your project, no longer shaman with shadows without doing anything, but also insert this in your project in onCreate:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.setProperty("org.apache.poi.javax.xml.stream.XMLInputFactory", "com.fasterxml.aalto.stax.InputFactoryImpl");
System.setProperty("org.apache.poi.javax.xml.stream.XMLOutputFactory", "com.fasterxml.aalto.stax.OutputFactoryImpl");
System.setProperty("org.apache.poi.javax.xml.stream.XMLEventFactory", "com.fasterxml.aalto.stax.EventFactoryImpl");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question