-
I am using a .net library (https://github.com/contentful/contentful.net) that loads json from a CMS online. I am also using this json library. Using Mono it works perfect. As one of the project's targets is Android, Google has requested after it was submitted that it must be compliant with the Play 64-bit requirement. It goes on to instruct to change the scripting backend to IL2CPP and check ARM64. When building and testing on Android the following error I think occurs when it hits this logic: json.SelectToken("$.items").ToObject<IEnumerable<T>>(Serializer); error that occurs:
This is the point in the json that it appears to be falling at - which is right near the start of the data: "fields": {
"title": "Hero",
"file": {
"url": "//images.hero.jpg",
"details": {
"size": 10000,
"image": {
"width": 1024,
"height": 768
}
},
"fileName": "Hero.jpg",
"contentType": "image/jpeg"
}
} Expected behaviorFor the app to run as it does in the editor or Mono Actual behaviorAndroid build with IL2CPP and ARM64 gives the above error. Steps to reproduceUnsure how to simplify a reproduction of the issue. DetailsDeveloped on Windows 10 Checklist
Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @jkafkaris ! Thanks for reaching out about this! I've inspected this a bit but I can't come with any answers. I'm missing too much context. Would it be possible if you could send the entire JSON text you're serializing (or as little as possible but still triggering the issue) as well as the type models? What is |
Beta Was this translation helpful? Give feedback.
-
Hi @jilleJr Thanks for getting back to me! I'll be back on the project on Monday and will try collate some of the data you have requested and get back to you. |
Beta Was this translation helpful? Give feedback.
-
Hi @jilleJr Good news, I needed to include a link.xml file to stop Unity stripping out relevant code from the Contentful assembly. I had it more narrowed but in the end preserved the whole assembly.
Works as expected now. |
Beta Was this translation helpful? Give feedback.
Hi @jilleJr
Good news, I needed to include a link.xml file to stop Unity stripping out relevant code from the Contentful assembly.
I had it more narrowed but in the end preserved the whole assembly.
<linker> <assembly fullname="ContentfulAssembly" preserve="all" /> </linker>
Works as expected now.