Closed dalton5 closed 4 years ago
The stacktrace issue
07-29 03:19:02.871 I/MonoDroid(26071): UNHANDLED EXCEPTION:
07-29 03:19:02.878 I/MonoDroid(26071): System.NotSupportedException: Unable to activate instance of type Java.Lang.Runnable from native handle 0xffbf446c (key_handle 0x10cd0c6). ---> System.MissingMethodException: No constructor found for Java.Lang.Runnable::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
07-29 03:19:02.878 I/MonoDroid(26071): --- End of inner exception stack trace ---
07-29 03:19:02.878 I/MonoDroid(26071): at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x000b5] in
07-29 03:19:04.198 F/com.wt(26071): java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception android.runtime.JavaProxyThrowable: System.NotSupportedException: Unable to activate instance of type Java.Lang.Runnable from native handle 0xffbf446c (key_handle 0x10cd0c6). ---> System.MissingMethodException: No constructor found for Java.Lang.Runnable::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
07-29 03:19:04.198 F/com.wt(26071): java_vm_ext.cc:542] --- End of inner exception stack trace ---
07-29 03:19:04.198 F/com.wt(26071): java_vm_ext.cc:542] at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x000b5] in
@dalton5 I had the same issue when the build action of json file was set to "EmbeddedResource". When i set the Build Action to "AndroidAsset" the issue was resolved. I hope it works for you too.
Unfortuately it's not working for me. Which version of xamarin and lottiexamarin version do you use please?
Hi,
I use the following json in my xamarin forms and I have an error Unable to parse composition
Is it a bug or another error?
I tested it in lottie files editor, it works. And in my mobile app the other lottie files works perfectly.
https://lottiefiles.com/tools/json-editor
{ "v": "5.3.4", "fr": 29.9700012207031, "ip": 0, "op": 300.00001221925, "w": 933, "h": 700, "nm": "Spiral Circular", "ddd": 0, "assets": [], "layers": [ { "ddd": 0, "ind": 1, "ty": 4, "nm": "Green", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [ 477.455, 354.939, 0 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100, 100 ], "ix": 6 } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "d": 1, "ty": "el", "s": { "a": 0, "k": [ 642.879, 642.879 ], "ix": 2 }, "p": { "a": 0, "k": [ 0, 0 ], "ix": 3 }, "nm": "Ellipse Path 1", "mn": "ADBE Vector Shape - Ellipse", "hd": false }, { "ty": "gs", "o": { "a": 0, "k": 100, "ix": 9 }, "w": { "a": 0, "k": 28, "ix": 10 }, "g": { "p": 3, "k": { "a": 0, "k": [ 0, 0.9803921568627451, 0.027450980392156862, 0.8784313725490196, 0.5, 0.9764705882352941, 0.07058823529411765, 0.3176470588235294, 1, 0.615686274509804, 0.03137254901960784, 1 ], "ix": 8 } }, "s": { "a": 0, "k": [ -320.508, -320.457 ], "ix": 4 }, "e": { "a": 0, "k": [ 322.371, 322.363 ], "ix": 5 }, "t": 1, "lc": 2, "lj": 2, "nm": "Gradient Stroke 1", "mn": "ADBE Vector Graphic - G-Stroke", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [ 1, 1, 1, 1 ], "ix": 4 }, "o": { "a": 0, "k": 0, "ix": 5 }, "r": 1, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [ -11.455, -4.939 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Ellipse 1", "np": 3, "cix": 2, "ix": 1, "mn": "ADBE Vector Group", "hd": false }, { "ty": "tm", "s": { "a": 0, "k": 0, "ix": 1 }, "e": { "a": 1, "k": [ { "i": { "x": [ 0.833 ], "y": [ 0.833 ] }, "o": { "x": [ 0.167 ], "y": [ 0.167 ] }, "n": [ "0p833_0p833_0p167_0p167" ], "t": 0, "s": [ 100 ], "e": [ 0 ] }, { "i": { "x": [ 0.833 ], "y": [ 0.833 ] }, "o": { "x": [ 0.167 ], "y": [ 0.167 ] }, "n": [ "0p833_0p833_0p167_0p167" ], "t": 300, "s": [ 0 ], "e": [ 100 ] }, { "t": 899.000036617021 } ], "ix": 2, "x": "var $bm_rt;\n$bm_rt = loopOut('cycle', 0);" }, "o": { "a": 0, "k": 0, "ix": 3 }, "m": 1, "ix": 2, "nm": "Trim Paths 1", "mn": "ADBE Vector Filter - Trim", "hd": false } ], "ip": 0, "op": 900.000036657751, "st": 0, "bm": 0 }, { "ddd": 0, "ind": 2, "ty": 4, "nm": "Orange", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [ 477.455, 354.939, 0 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 89.999, 89.999, 100 ], "ix": 6 } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "d": 1, "ty": "el", "s": { "a": 0, "k": [ 642.879, 642.879 ], "ix": 2 }, "p": { "a": 0, "k": [ 0, 0 ], "ix": 3 }, "nm": "Ellipse Path 1", "mn": "ADBE Vector Shape - Ellipse", "hd": false }, { "ty": "gs", "o": { "a": 0, "k": 100, "ix": 9 }, "w": { "a": 0, "k": 28, "ix": 10 }, "g": { "p": 3, "k": { "a": 0, "k": [ 0, 1, 0, 0.5372549019607843, 0.5, 0.9647058823529412, 0.06666666666666667, 0.48627450980392156, 1, 0.7490196078431373, 0, 1 ], "ix": 8 } }, "s": { "a": 0, "k": [ -320.508, -320.457 ], "ix": 4 }, "e": { "a": 0, "k": [ 322.371, 322.363 ], "ix": 5 }, "t": 1, "lc": 2, "lj": 2, "nm": "Gradient Stroke 1", "mn": "ADBE Vector Graphic - G-Stroke", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [ 1, 1, 1, 1 ], "ix": 4 }, "o": { "a": 0, "k": 0, "ix": 5 }, "r": 1, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [ -11.455, -4.939 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Ellipse 1", "np": 3, "cix": 2, "ix": 1, "mn": "ADBE Vector Group", "hd": false }, { "ty": "tm", "s": { "a": 0, "k": 0, "ix": 1 }, "e": { "a": 1, "k": [ { "i": { "x": [ 0.833 ], "y": [ 0.833 ] }, "o": { "x": [ 0.167 ], "y": [ 0.167 ] }, "n": [ "0p833_0p833_0p167_0p167" ], "t": 0, "s": [ 100 ], "e": [ 0 ] }, { "t": 151.000006150356 } ], "ix": 2, "x": "var $bm_rt;\n$bm_rt = loopOut('cycle', 0);" }, "o": { "a": 0, "k": 0, "ix": 3 }, "m": 1, "ix": 2, "nm": "Trim Paths 1", "mn": "ADBE Vector Filter - Trim", "hd": false } ], "ip": 0, "op": 900.000036657751, "st": 0, "bm": 0 }, { "ddd": 0, "ind": 3, "ty": 4, "nm": "Big Path", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [ 477.455, 354.939, 0 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100, 100 ], "ix": 6 } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "d": 1, "ty": "el", "s": { "a": 0, "k": [ 642.879, 642.879 ], "ix": 2 }, "p": { "a": 0, "k": [ 0, 0 ], "ix": 3 }, "nm": "Ellipse Path 1", "mn": "ADBE Vector Shape - Ellipse", "hd": false }, { "ty": "st", "c": { "a": 0, "k": [ 0.66542583704, 0.66542583704, 0.66542583704, 1 ], "ix": 3 }, "o": { "a": 0, "k": 12, "ix": 4 }, "w": { "a": 0, "k": 28, "ix": 5 }, "lc": 1, "lj": 1, "ml": 4, "ml2": { "a": 0, "k": 4, "ix": 8 }, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [ 1, 1, 1, 1 ], "ix": 4 }, "o": { "a": 0, "k": 0, "ix": 5 }, "r": 1, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [ -11.455, -4.939 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Ellipse 1", "np": 3, "cix": 2, "ix": 1, "mn": "ADBE Vector Group", "hd": false } ], "ip": 0, "op": 900.000036657751, "st": 0, "bm": 0 }, { "ddd": 0, "ind": 4, "ty": 4, "nm": "Small Path", "sr": 1, "ks": { "o": { "a": 0, "k": 100, "ix": 11 }, "r": { "a": 0, "k": 0, "ix": 10 }, "p": { "a": 0, "k": [ 477.455, 354.939, 0 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 89.999, 89.999, 100 ], "ix": 6 } }, "ao": 0, "shapes": [ { "ty": "gr", "it": [ { "d": 1, "ty": "el", "s": { "a": 0, "k": [ 642.879, 642.879 ], "ix": 2 }, "p": { "a": 0, "k": [ 0, 0 ], "ix": 3 }, "nm": "Ellipse Path 1", "mn": "ADBE Vector Shape - Ellipse", "hd": false }, { "ty": "st", "c": { "a": 0, "k": [ 0.666666686535, 0.666666686535, 0.666666686535, 1 ], "ix": 3 }, "o": { "a": 0, "k": 14, "ix": 4 }, "w": { "a": 0, "k": 28, "ix": 5 }, "lc": 2, "lj": 2, "nm": "Stroke 1", "mn": "ADBE Vector Graphic - Stroke", "hd": false }, { "ty": "fl", "c": { "a": 0, "k": [ 1, 1, 1, 1 ], "ix": 4 }, "o": { "a": 0, "k": 0, "ix": 5 }, "r": 1, "nm": "Fill 1", "mn": "ADBE Vector Graphic - Fill", "hd": false }, { "ty": "tr", "p": { "a": 0, "k": [ -11.455, -4.939 ], "ix": 2 }, "a": { "a": 0, "k": [ 0, 0 ], "ix": 1 }, "s": { "a": 0, "k": [ 100, 100 ], "ix": 3 }, "r": { "a": 0, "k": 0, "ix": 6 }, "o": { "a": 0, "k": 100, "ix": 7 }, "sk": { "a": 0, "k": 0, "ix": 4 }, "sa": { "a": 0, "k": 0, "ix": 5 }, "nm": "Transform" } ], "nm": "Ellipse 1", "np": 3, "cix": 2, "ix": 1, "mn": "ADBE Vector Group", "hd": false } ], "ip": 0, "op": 900.000036657751, "st": 0, "bm": 0 } ], "markers": [] }