Couldn't invoke: attempt to invoke virtual method 'java.lang.class[]

Let me tell you briefly, I’m new to Kodular. My idea with this app is that on screen 1 there’s a login and password (no problem up to this point).
When I want to create a product (image, product name, price, and available quantity) with the dynamic components, when I press the floating + button in the app, I get the following error:

" couldn’t invoke: attempt to invoke virtual method ‘java.lang.class java.lang.reflect.method.getparametertypes()’ on a null object reference "

And it doesn’t add anything directly. It’s worth clarifying that pressing the + button should appear to add a photo from the gallery, add a title, enter the price, and the available quantity, but it doesn’t do anything, just throws me that error.

I should clarify that it’s not yet connected to firebase_database.
Because this is the admin app where the products would be uploaded. Then I’ll create the user app where those products would be displayed.

If anyone has the time and wants to help, I’d really appreciate it. I’ll pass on the AIA if necessary. I’ll leave a screenshot of the blocks. I clarify that in the design I only have the vertical scroll, piker image, fab_add, and dynamic components.

Check your textbox created in component id

You have used name {id}, price {id} and stock {id} and whose id also not properly set but that is not found anywhere. I hope that should be yoir textbox id and it should created either in horizontal arrangement {id} or vertical arrangement {id}

Make sure with that. Due to this, it throws that get parameter type on null

Ok?

So you’re telling me what product ID is generating this error? How would I fix this? I’m a novice and just learning the basics.

I also gave you that suggestion in the image. Just swap the id i have shown in the image amd try

In three places you need to swap the component id. That alone seems to be enough

While copy paste the id you may did mistake amd morever you did exactly for the text boxes and didnt have this logical error with anyother dynamic components

Could you tell me how to change the ID or where I can find it to change it? Or what color to find it in? Or how to generate what set of blocks?

Did you see the above image? I have showed you in arrow mark like this goes here and this should goes here. Cont you find it?

I am resharing the image.

Forgive my ignorance, and I don’t want to upset you, but I’ve already seen the image and the arrows. I need to know what to change and where. I promise not to bother you anymore. Because from what I understand from your arrows, I changed the Getglobal ProductID to the same Getglobal ProductID.

In the image, you should maje changes only in 3 places.

Existing wrong id

Create component in - Get component  id {price {globalproductId}
Component - Textbox
Id - Vertical Arrangement {get globalproductId }

Change into

Create component in - Get component  id {Vertical Arrangement {get globalproductId }}
Component - Textbox
Id - price{getglobalproductID}

Likethis do it for remaining 2 textbox.

I hope i made a clear statement

Yes, thanks, but it still says the same thing. Same mistake. I’ve already modified what you told me, but it’s still the same. Thanks anyway.

Can you share again your procedure (dynamic component creation) image?

Of course, there you have them both on the design side and on the blocks side.


also make changes here

after making changes the previous add this change too and try again. also i find two times this block?


is this made by you or someone created?

This fixture will remove the above said error 100%

Where is the 35%? What value does it have? Just the number in blue? I built it myself, but I use chatgpt for some syntax corrections.

I have spotted these things from your shared image only man. I have not added any (scrolldown to last, you will fimd it) and this 35% will not work. Use onli integer values

Now it tells me that I have an error in va_ that is represented as vertical arragament
Hahaha it drives me crazy

com.google.appinventor.components.runtime.va_

I use ChatGPT’s pro version to support me. I complete the syntax and send him the photo, and he corrects it for me, but I see that it’s not helping at all. At first, he made a lot of corrections, but lately, he’s been going crazy.

Share us complete error

Did you made the adjustment that i said it for va- component above?

Yes, I have already corrected the error, and I have also discovered spelling errors that have already been modified.


See the error, it says clearly VerticalArrangememt_ where you should use the name VerticalArrangement only

That last underscore why do you use? Remove it, but its id va_ is acceptable one, do not change it

When I remove the “_” it triggers this error, it’s another “NULL”

" Couldn’t invoke: Attempt to invoke virtual method ‘java.lang.Class java.lang.reflect.Method.getParameterTypes()’ on a null object reference "

and I have the same error again as today, that is, we go back to the beginning.