Namespaces
Variants
Actions

Archived:Class inheriting from Canvas should not implement a method called update() (Known Issue)

Jump to: navigation, search
Archived.png
Archived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.


Article Metadata

Compatibility
Platform(s): S60 2nd Edition and FP1, FP2, FP3
S60 3rd Edition

Article
Created: User:Technical writer 1 (25 Jan 2007)
Last edited: hamishwillee (18 Jun 2012)

Description

If an object has Canvas as its base class and implements a method named update(), the MIDlet in question will not function properly. This affects both S60 devices as well as S60 emulators.

If this MIDlet is executed in an S60 emulator, the emulator will exit with the following error message:

java.lang.Error: ClassFormatError: Override of final method

The reason this error is is that in the Symbian Java ME implementation the method update() of class Canvas is defined to be final, and the inheriting class cannot override a final method of the base class.

Solution

A workaround is to change the name of this method to something other than "update". You can also obfuscate the MIDlet to avoid this problem.

This page was last modified on 18 June 2012, at 09:09.
153 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved