Failing on android
SnakeYAML version: 1.16 Java: Running on Android 5.0.1
Failing at
Constructor construct = new Constructor(Message.class);
Yaml yml = new Yaml(construct);
The initalization is failing with below error.
java.lang.VerifyError: org/yaml/snakeyaml/representer/Representer$RepresentJavaBean
at org.yaml.snakeyaml.representer.Representer.<init>(Representer.java:43)
at org.yaml.snakeyaml.Yaml.<init>(Yaml.java:95)
at in.dreamlabs.wallet.service.MessageParser.parseMessage(MessageParser.java:53)
at in.dreamlabs.wallet.service.MessageParser.submit(MessageParser.java:132)
at in.dreamlabs.wallet.view.MainActivity.importSMS(MainActivity.java:103)
at in.dreamlabs.wallet.view.MainActivity.onCreate(MainActivity.java:60)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Comments (8)
-
-
I have encountered the same crash using version 1.16 running on Android 4.4.2, although it worked correctly on a device running 5.0. Recompiling from the 1.16 tag using the android profile made no difference.
However, I checked out the 1.15 tag and compiled that (using the android profile) and that worked on both Android 4.4.2 and 5.0.
-
I am not really sure what's going on. I guess
Message.class
is theandroid.os.Messag
, am I right?I have tried simple dump/load of the empty
new Message()
with version16
and17-SNAPSHOT
built with-Pandroid
. It worked find (at least without exceptions) in Emulator withAPI_19_4_4
andAPI_22_5_0
and on real OnePlus 2 running OxigenOS 2.2.0 which is5.1.1
I thing we need to figure out why it is
java.lang.VerifyError
JavaDoc for VeifyError.class says :
Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
In mine experience it could be anything :) Unfortunately not so much of android development I know.
Could it be connected to something like Android java.lang.VerifyError ?
-
Account Deleted This jar file worked. http://www.java2s.com/Code/Jar/s/Downloadsnakeyaml110androidjar.htm
-
Account Deleted I think the library is missing some Android stuff such as
Manifest
info. -
As you can see from that jar you pointed out - it's MANIFEST.INF is empty, so is the one in snakeyaml-...-adroind.jar which you can build yourself. So check your App project where you use SnakeYAML-android jar and see what could be wrong there, because at the moment I do not see SnakeYAML as the main reason of this problem.
-
Issue
#356was marked as a duplicate of this issue. -
- edited description
- changed status to wontfix
- Log in to comment
Does this solve the issue ?
https://bitbucket.org/asomov/snakeyaml/wiki/Android