Android Dalvik Conversion For Xmlpullparser
I'm developing an Android app and for one component I can test outside of Android as it does not use any Android code. It uses xstream and I have the following libraries include: x
Solution 1:
I was having the same problem with a separately developed project that I was trying to integrate with an android app. The problem is that the Android API defines the class XmlPullParser (https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html) and is why this conflict arises.
I solved the problem by excluding the xmlpull dependency from the project which allowed for the Android-defined version of the classes to be used. This is how my build.gradle file looks for the app module (just the dependency section to illustrate the exclusion):
dependencies {
compile (project(':epublib:epublib-core')) {
exclude group: 'xmlpull'
}
compile'com.android.support:appcompat-v7:21.0.+'compile'com.android.support:support-v4:21.0.+'
}
The syntax is important. It must be of the form
compile (project(':project-name')) {
exclude group: 'group-name', module: 'module-name'
}
Post a Comment for "Android Dalvik Conversion For Xmlpullparser"