Android : Robolectric and com.sun.org.apache.xerces.internal.parsers.SAXParser

on Thursday, October 9, 2014


I'm trying to integrate espresso and robolectric tests into my gradle project. I started out with the project templates of testingarchitecture and deckard-gradle.


With any of these approaches the following exception is thrown when I run the robolectric tests:



error: package com.sun.org.apache.xerces.internal.parsers does not exist
import com.sun.org.apache.xerces.internal.parsers.SAXParser;


We use the SAXParser in our shadow implementation for android.util.Xml.


I found the following part in robolectric's Setup class, but could not yet figure out how this play together with the problem: https://github.com/robolectric/robolectric/blob/master/src/main/java/org/robolectric/bytecode/Setup.java#L119


We use robolectric 2.3 and the robolectric-gradle-plugin 0.12.+


I guess that's a classpath problem? Any idea?


0 comments:

Post a Comment