Skip to main content

Porting on Android

4 replies [Last post]
technolgia
Offline
Joined: 2009-03-09

Hello,

I am trying to port my application onto Andriod. I am using MicroEmu to convet my jar file into .apk file. I was successful in getting the LWUIT Demo on the Android Emulator. When i convert my application and install onto the device on launch i get an error which says " The applicaition AppName (process org.microemu.andriod.com.xyz.abc.MidletName) has stopped unexpectedly. Please try again. and i get a Force Close".

When i checked the logs i get the following error:

D/dalvikvm( 250): GC_EXPLICIT freed 674 objects / 51912 bytes in 122ms
D/PackageParser( 62): Scanning package: /data/app/vmdl19708.tmp
I/PackageParser( 62): org.microemu.android.com.xyz.mobile.MainMidlet: compa
t added android.permission.WRITE_EXTERNAL_STORAGE android.permission.READ_PHONE_
STATE
D/dalvikvm( 62): GC_FOR_MALLOC freed 7816 objects / 452872 bytes in 191ms
D/PackageManager( 62): Scanning package org.microemu.android.com.xyz.mobile
.MainMidlet
I/PackageManager( 62): /data/app/org.microemu.android.com.xyz.mobile.MainMi
dlet-1.apk changed; unpacking
D/installd( 35): DexInv: --- BEGIN '/data/app/org.microemu.android.com.xyz.
mobile.MainMidlet-1.apk' ---
D/KeyguardViewMediator( 62): pokeWakelock(5000)
I/ARMAssembler( 62): generated scanline__00000177:03515104_00001001_00000000 [
91 ipp] (114 ins) at [0x343550:0x343718] in 11822891 ns
I/ActivityManager( 62): Displayed activity com.android.launcher/com.android.la
uncher2.Launcher: 120972 ms (total 120972 ms)
D/dalvikvm( 119): GC_EXTERNAL_ALLOC freed 875 objects / 45304 bytes in 246ms
W/KeyCharacterMap( 119): No keyboard for id 0
W/KeyCharacterMap( 119): Using default keymap: /system/usr/keychars/qwerty.kcm.
bin
D/dalvikvm( 257): DexOpt: load 963ms, verify 10579ms, opt 231ms
D/installd( 35): DexInv: --- END '/data/app/org.microemu.android.com.xyz.mo
bile.MainMidlet-1.apk' (success) ---
D/PackageManager( 62): Activities: org.microemu.android.MicroEmulator
I/ActivityManager( 62): Force stopping package org.microemu.android.com.xyz
.mobile.MainMidlet uid=10034
I/installd( 35): move /data/dalvik-cache/data@app@org.microemu.android.com.pra
vaa.mobile.MainMidlet-1.apk@classes.dex -> /data/dalvik-cache/data@app@org.micro
emu.android.com.xyz.mobile.MainMidlet-1.apk@classes.dex
D/PackageManager( 62): New package installed in /data/app/org.microemu.android
.com.xyz.mobile.MainMidlet-1.apk
D/dalvikvm( 62): GC_EXPLICIT freed 10673 objects / 585672 bytes in 223ms
D/AndroidRuntime( 244): Shutting down VM
D/jdwp ( 244): adbd disconnected
I/AndroidRuntime( 244): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 62): Start proc com.svox.pico for broadcast com.svox.pico/.
VoiceDataInstallerReceiver: pid=260 uid=10028 gids={}
W/RecognitionManagerService( 62): no available voice recognition services foun
d
I/ActivityThread( 260): Publishing provider com.svox.pico.providers.SettingsPro
vider: com.svox.pico.providers.SettingsProvider
D/dalvikvm( 147): GC_FOR_MALLOC freed 3950 objects / 243664 bytes in 424ms
I/ActivityManager( 62): Starting activity: Intent { act=android.intent.action.
MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=org.microemu.andr
oid.com.xyz.mobile.MainMidlet/org.microemu.android.MicroEmulator }
I/ActivityManager( 62): Start proc org.microemu.android.com.xyz.mobile.Main
Midlet for activity org.microemu.android.com.xyz.mobile.MainMidlet/org.microe
mu.android.MicroEmulator: pid=268 uid=10034 gids={3003, 1015}
I/ARMAssembler( 62): generated scanline__00000077:03545404_00000004_00000000 [
47 ipp] (67 ins) at [0x2e8268:0x2e8374] in 1571631 ns
V/MicroEmulator( 268): implementation registered [org.microemu.cldc.file.FileSy
stem]
V/MicroEmulator( 268):
E/dalvikvm( 268): Could not find class 'javax.microedition.media.Player', refer
enced from method com.sun.lwuit.impl.midp.GameCanvasImplementation.createVideoCo
mponent
W/dalvikvm( 268): VFY: unable to resolve check-cast 779 (Ljavax/microedition/me
dia/Player;) in Lcom/sun/lwuit/impl/midp/GameCanvasImplementation;
D/dalvikvm( 268): VFY: replacing opcode 0x1f at 0x0001
D/dalvikvm( 268): VFY: dead code 0x0003-0018 in Lcom/sun/lwuit/impl/midp/GameCa
nvasImplementation;.createVideoComponent (Ljava/lang/Object;)Ljava/lang/Object;
E/dalvikvm( 268): Could not find class 'javax.microedition.media.Player', refer
enced from method com.sun.lwuit.impl.midp.GameCanvasImplementation.getMediaTime
W/dalvikvm( 268): VFY: unable to resolve check-cast 779 (Ljavax/microedition/me
dia/Player;) in Lcom/sun/lwuit/impl/midp/GameCanvasImplementation;
D/dalvikvm( 268): VFY: replacing opcode 0x1f at 0x0000
D/dalvikvm( 268): VFY: dead code 0x0002-0006 in Lcom/sun/lwuit/impl/midp/GameCa
nvasImplementation;.getMediaTime (Ljava/lang/Object;)J
E/dalvikvm( 268): Could not find class 'javax.microedition.media.Player', refer
enced from method com.sun.lwuit.impl.midp.GameCanvasImplementation.getVideoContr
ol
W/dalvikvm( 268): VFY: unable to resolve check-cast 779 (Ljavax/microedition/me
dia/Player;) in Lcom/sun/lwuit/impl/midp/GameCanvasImplementation;
D/dalvikvm( 268): VFY: replacing opcode 0x1f at 0x0000
D/dalvikvm( 268): VFY: dead code 0x0002-0010 in Lcom/sun/lwuit/impl/midp/GameCa
nvasImplementation;.getVideoControl (Ljava/lang/Object;)Ljava/lang/Object;
E/dalvikvm( 268): Could not find class 'javax.microedition.media.control.VideoC
ontrol', referenced from method com.sun.lwuit.impl.midp.GameCanvasImplementation
.getVideoHeight
W/dalvikvm( 268): VFY: unable to resolve check-cast 781 (Ljavax/microedition/me
dia/control/VideoControl;) in Lcom/sun/lwuit/impl/midp/GameCanvasImplementation;

D/dalvikvm( 268): VFY: replacing opcode 0x1f at 0x0000
D/dalvikvm( 268): VFY: dead code 0x0002-0006 in Lcom/sun/lwuit/impl/midp/GameCa
nvasImplementation;.getVideoHeight (Ljava/lang/Object;)I
E/dalvikvm( 268): Could not find class 'javax.microedition.media.control.VideoC
ontrol', referenced from method com.sun.lwuit.impl.midp.GameCanvasImplementation
.getVideoWidth
W/dalvikvm( 268): VFY: unable to resolve check-cast 781 (Ljavax/microedition/me
dia/control/VideoControl;) in Lcom/sun/lwuit/impl/midp/GameCanvasImplementation;

D/dalvikvm( 268): VFY: replacing opcode 0x1f at 0x0000
D/dalvikvm( 268): VFY: dead code 0x0002-0006 in Lcom/sun/lwuit/impl/midp/GameCa
nvasImplementation;.getVideoWidth (Ljava/lang/Object;)I
E/dalvikvm( 268): Could not find class 'javax.microedition.media.control.VideoC
ontrol', referenced from method com.sun.lwuit.impl.midp.GameCanvasImplementation
.paintVideo
W/dalvikvm( 268): VFY: unable to resolve check-cast 781 (Ljavax/microedition/me
dia/control/VideoControl;) in Lcom/sun/lwuit/impl/midp/GameCanvasImplementation;

D/dalvikvm( 268): VFY: replacing opcode 0x1f at 0x0001
W/dalvikvm( 268): VFY: unable to resolve exception class 778 (Ljavax/microediti
on/media/MediaException;)
W/dalvikvm( 268): VFY: unable to find exception handler at addr 0x42
W/dalvikvm( 268): VFY: rejected Lcom/sun/lwuit/impl/midp/GameCanvasImplementat
ion;.paintVideo (Lcom/sun/lwuit/Component;ZLjava/lang/Object;Ljava/lang/Object;L
java/lang/Object;)V
W/dalvikvm( 268): VFY: rejecting opcode 0x0d at 0x0042
W/dalvikvm( 268): VFY: rejected Lcom/sun/lwuit/impl/midp/GameCanvasImplementat
ion;.paintVideo (Lcom/sun/lwuit/Component;ZLjava/lang/Object;Ljava/lang/Object;L
java/lang/Object;)V
W/dalvikvm( 268): Verifier rejected class Lcom/sun/lwuit/impl/midp/GameCanvasIm
plementation;
W/dalvikvm( 268): threadid=11: thread exiting with uncaught exception (group=0x
4001d800)
I/ActivityManager( 62): Displayed activity org.microemu.android.com.xyz.mob
ile.MainMidlet/org.microemu.android.MicroEmulator: 2530 ms (total 2530 ms)
E/AndroidRuntime( 268): FATAL EXCEPTION: Thread-12
E/AndroidRuntime( 268): java.lang.VerifyError: com.sun.lwuit.impl.midp.GameCanv
asImplementation
E/AndroidRuntime( 268): at com.sun.lwuit.impl.ImplementationFactory.crea
teImplementation(ImplementationFactory.java:70)
E/AndroidRuntime( 268): at com.sun.lwuit.Display.init(Display.java:265)
E/AndroidRuntime( 268): at com.xyz.mobile.MainMidlet.startApp(MainMid
let.java:118)
E/AndroidRuntime( 268): at javax.microedition.midlet.MIDlet$MIDletAccess
or.startApp(MIDlet.java:50)
E/AndroidRuntime( 268): at org.microemu.android.MicroEmulator$3.run(Micr
oEmulator.java:206)
E/AndroidRuntime( 268): at java.lang.Thread.run(Thread.java:1096)
W/ActivityManager( 62): Force finishing activity org.microemu.android.com.pr
avaa.mobile.MainMidlet/org.microemu.android.MicroEmulator
I/ARMAssembler( 62): generated scanline__00000077:03515104_00000000_00000000 [
33 ipp] (47 ins) at [0x2e96c8:0x2e9784] in 1352832 ns
I/Process ( 268): Sending signal. PID: 268 SIG: 9
W/InputManagerService( 62): Window already focused, ignoring focus gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@43f3b080
I/ActivityManager( 62): Process org.microemu.android.com.xyz.mobile.MainMid
let (pid 268) has died.

The error above is too much to read and understand though.For me it looks like the error is because of :
Could not find class 'javax.microedition.media.Player', refer
enced from method com.sun.lwuit.impl.midp.GameCanvasImplementation.createVideoCo
mponent
.

Am i doing something wrong? Can someone help me with this. Also i read there is an Android Implementation of LWUIT. Where can i get the sources for these.

Thanking you,
Regards,
S.A.Norton Stanley

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
technolgia
Offline
Joined: 2009-03-09

Hi,

I removed the Media Classes and i could build the application successfully.

Thanking you,
Regards,
S.A.Norton Stanley

rsaadat
Offline
Joined: 2011-04-26

Hi;
I have the same problem. Could you inform me how I can remove Media Class?
Thanks

rsaadat
Offline
Joined: 2011-04-26

Hi;
I have the same problem. Could you inform me how I can remove Media Class?
Thanks

amitgurnani
Offline
Joined: 2011-03-27

Hi,

I am also facing the same issue. How do you remove the media classes. Please reply.

Thanks