Runtime Error: "Attempt to invoke virtual method 'java.lang.Class java.lang.Obje

125 views
Skip to first unread message

L Yim

unread,
Dec 26, 2017, 5:46:09 AM12/26/17
to mitappinv...@googlegroups.com
I am testing Arduino HC-05 Bluetooh Led On/Off with App Inventor 2. I am getting Runtime Error. 
Please help!
Pressing any of the sending text buttons. (It turned the Led On or Off OK.)
However, immediately I got from Companion or from App, Runtime Error.
"Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference"
I am using Android 5.1.1 Nexus 4 mobile phone and Arduino UNO. (With Windows & Linux. Using more than 1 browsers.)
image 2 is part of image 1.
Much appreciated. Thank you.
Runtime Error 2.jpg
Runtime Error 1.jpg

Abraham Getzler

unread,
Dec 26, 2017, 11:51:38 AM12/26/17
to MIT App Inventor Forum
The Timer event is calling procedure doReceive.

But I don't see it in your Downloaded Blocks Image.

Maybe that is a dead procedure reference?

ABG

L Yim

unread,
Dec 26, 2017, 6:42:14 PM12/26/17
to MIT App Inventor Forum
Thanks Abraham. No wonder it was working previously.
I accidentally disabled the block.
I have now also made some modifications.
It is working fine now. No more Runtime Error.
Attached the revised blocks.

Blocks 1a.png
Reply all
Reply to author
Forward
0 new messages