Extension in dynamic components schema

I'm trying to add rounded corner extension in schema but I'm getting an error.
Couldn't invoke: Attempt to invoke virtual method 'java.lang.Class java.lang.reflect.Method.getParameterTypes()' on a null object reference

Here is my schema
{
"name": "Generated Templated",
"metadata-version": 1,
"author": "Schema Listview generator tool",
"platforms": [
"App Inventor",
"Kodular",
"Niotron"
],
"extensions": {
"CornerRadius": "com.sunny.CornerRadius.CornerRadius"
},
"keys": [
"id",
"color"
],
"components": [
{
"id": "ListviewContainer{id}",
"type": "HorizontalArrangement",
"properties": {
"Height": 50,
"Width": -1095
}
},
{
"id": "CornerRadius1{id}",
"type": "com.sunny.CornerRadius.CornerRadius",
"properties": {
"component":"ListviewContainer{id}",
"bgColor": "{color}",
"topLeft": 20,
"topRight":20,
"bottomLeft": 20,
"bottomRight":20
}
}
]
}

Any idea what is wrong? Thanks

Why not create this setup in a project and use the generator:

That's what I did but it only included the extension and didn't add the component to it so I'm trying to figure it out myself

You may need to show your blocks for that then...

Only schema block with the json it works without the extension component

This is where the issue is I think. The type could be the issue

Best i can suggest is to ask here:

1 Like