Skip to content

Updated SnakeYaml version to work on Android devices#9

Open
itsymbal wants to merge 1 commit intoorhanobut:masterfrom
itsymbal:master
Open

Updated SnakeYaml version to work on Android devices#9
itsymbal wants to merge 1 commit intoorhanobut:masterfrom
itsymbal:master

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.

2 participants