Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated SnakeYaml version to work on Android devices #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itsymbal
Copy link

The current version of Yaml (1.14) doesn't work on Android devices or emulators. The newer version supports Android.
Unfortunately, it uses the SNAPSHOT version of the library... SAD! - which means I won't be able to use it offline on the subway... but at least it works.
If there's a better way to do it, by all means, use that way.
The current 1.14 version causes this exception:

java.lang.NoClassDefFoundError: Failed resolution of: Ljava/beans/Introspector;
at org.yaml.snakeyaml.introspector.PropertyUtils.getPropertiesMap(PropertyUtils.java:63)

I'm going to try to figure out a way to share yaml and json between test and androidTest and update the README.

@koral--
Copy link

koral-- commented Jun 13, 2017

We are using stock mockwebserverplus but with swapped snakeyaml dependency in our Android projects. build.gradle looks like that:

	androidTestCompile('com.orhanobut:mockwebserverplus:1.0.0') {
		exclude module: 'snakeyaml'
	}
	androidTestCompile 'pl.droidsonroids.yaml:snakeyaml:1.18-android'

That artifact is published to maven central, so no additional repository is needed.
'pl.droidsonroids.yaml:snakeyaml is based on this source: https://github.com/bmoliveira/snake-yaml

@itsymbal
Copy link
Author

That's even better. @orhanobut Should I update the dependency in this PR to use the one @koral suggested? That seems like a better option than relying on a SNAPSHOT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants