Android Question stopservice not working or something else is wrong.

sorex

Expert
Licensed User
Longtime User
Hello,

Got a new computer at work a few months ago.

A good reason to try to update B4A from v11 to v13.

But for some reason my app doesn't compile anymore and spits out some weird error as if stop service can't locate the service.

Any idea how I can fix this?

B4X:
Linking resources    (0.49s)
    build tools: 36.0.0, android jar: android-36
Compiling debugger engine code.    Error
B4A line: 54
StopService(Receiver)
shell\src\xxx\yyy\broadcaster_ui_subs_0.java:20: error: cannot find symbol
broadcaster_ui.__c.runVoidMethod ("StopService",__ref.getField(false, "ba"),(Object)((broadcaster_ui._receiver.getObject())));
                                                                                                    ^
  symbol:   variable _receiver
  location: class broadcaster_ui
1 error
only showing the first 1 errors, of 11 total; use -Xmaxerrs if you would like to see more
 

sorex

Expert
Licensed User
Longtime User
I got a workaround.

It seems that receiver is something reserved now.

If I rename the service from receiver to receiverSvc and change the relevant code it compiles without problems.
 
Last edited:
Upvote 0
Top