java.lang.NoClassDefFound error while running app - java

I was trying to run an application on my phone, when I got this error:
"This application caused an error and may not function correctly.
java.lang.NoClassDefFound
Error:
com/nokia/mid/ui/lcdui/DisplayStateListener"
Can anyone tell me how can I fix this error?
I am a noob to Java and I have just started learning it at my school. Basically, I am working to make an application compatible with my phone. I will be really grateful to you if you could guide me on how can I proceed.
Here is the link to the file: http://msoft9.com/site_down-java-apps.xhtml?get-file=1648

It looks like the application is using the socalled NokiaUI API.
This is a rather old API developed by Nokia containing User-Interface functionality for various things, such as keeping the screen alive or making the MIDlet use the whole screen (FullScreen). It was developed in the MIDP1.0 days before things like FullScreen became possible in MIDP2.0
I'm guessing that DisplayStateListener is a class in NokiaUI.
Your phone apparently doesn't support NokiaUI. Not all phones does. It is supported by other brands than Nokia though. I know that Sony Ericsson phones support the NokiaUI API.
Even today NokiaUI is still used by JavaME developers, because it is (surprisingly/sadly) still the only way to keep the screen alive. But mostly you won't notice it is used, because developers naturally use a try/catch block to utilize it.
That's obviously not what the developers has done in your case.
But you can probably find another version of the MIDlet that doesn't use NokiaUI.
More about NokiaUI API:
http://developer.nokia.com/community/wiki/Nokia_UI_API

Related

Developing in Eclipse for Android using Phonegap. 'Untagging Socket' error=-13

So I have developed iphone/ipad apps before using Xcode and Phonegap/Cordova for a while now, submitted a few to the app store and they were accepted. So I have decided to convert one from ios to android. Thinking that apart from a few changes from ObjectiveC to JAVA, all the Phonegap stuff would work.
A lot of it does, but there is a few bugs, as you would expect. But one thing that is worrying me is that my output window in Eclipse is constantly being spammed with error messages, even when my development device is idle.
The main error is:
Untagging socket (number) failed errno=-13
Also errors saying 'tagging' a socket has also failed, with the same error message, I am new to Eclipse and JAVA. And have no idea what this means.
I have Googled the hell out of it with little success, apart from something about paths, but I have checked them all and they seem to be correct.
Has anyone seen this before, or have any idea what might be going on? Or where I should look to try and figure out why this error is happening.
You can create a filter and then you will only see the info from your app.
https://stackoverflow.com/a/4044174/41679

Reasons an app could work on android 2.3 and fail on android 3.0

I have written an app that appears to work faultlessly on android 2.3. I have just been told by email that my app crashes (immediately on startup) on android 3.0 tablets. Unfortunately I do not have access to such a device.
To try and make my app as crashproof as possible I have been employing Lint and FindBugs. My program does use more than one thread and Findbug reports several instance of "Inconsistent synchronization" because different threads may be reading certain data at the same time. I beleive this not to be a problem because at the times the data is being read it should not be in the process of being altered. It occurs to me though that perhaps android 3.0 has some built-in detection of such instances?
I am interested in any other thoughts on what kind of things would cause a program to work on 2.3 but not on 3.0.
I had a similar problem with an app.
My issue was due to the introduction of a new exception when I attempt to perform a networking operation on the main UI thread.
Please refer to How to fix android.os.NetworkOnMainThreadException? to have more explanation.
I also used the Android emulator with the Android 3.0 API to reproduce the bug.

Where to start writing a simple java app for a mobile platform?

//Backstory
i have a LG Rumor Touch phone, and it comes with a couple social media apps that are just awful to use, and restrictive as far as features.
//Question
Ive worked with people before making iphone apps who would write basically like a "wrapper" that would just invoke a browser window inside the app to load a site where the app actually ran, im looking to do something similar but using java, but am wanting some advice as to where to get started.
Take a look at PhoneGap, the Android version looks like a good fit for what you are trying to accomplish, since you mentioned Java in the tag.
I dont know enough about the LG Touch OS development... so I apologize if off track
Here is an Android Quick Start

J2ME app to access incoming call - Where to start?

Here's my requirement:
I often receive calls from unidentified numbers on my mobile phones. I would like an application which would use a reference list like this, and show me the carrier name and the area of origin along with the number on screen.
Mobile make : Sony Ericsson
Model : C902
Operating System: Propreitary
J2ME: MIDP 2.0
Here are my questions:
Is it possible to do something like this? I have installed a lot of java apps on my mobile, and all of them have to be launched seperately, can be run in the background, but they never seem to access anything native.
If it is possible, which area of J2Me should I start with, for creating an application that achieves the above requirement?
If it is not possbile, what are my alternatives?
I'm pretty sure this isn't possible. I dabbled in J2ME for a while, and came to the conclusion that it's basically just a big joke hard to do anything meaningful. Sorry.
can be run in the background? yes using Push Registry. access anything native? it depends on which native thing you want to access.
It is not possible.
On this model, you don't have alternatives, but on Symbian you can try Qt with help of Qt Mobility Project

Building Apps for Motorola Cell Phone

I have an L6 phone from motorola, a usb cable to connect it to my computer, and the Tools for Phones software so I can do things like upload my own custom ringtones or download pictures from the phone's camera.
I have some ideas for programs I'd like to run on the phone, and it supports java, but I don't see anything in the software that I have for uploading them. Even if they did, I wouldn't know where to get started.
Does anyone have any info on how to get started building apps for this or similar phones?
I've never used Morotolla's SDK but from my limited work in JME the real hook in the 3rd party tools are the emulators. Setting up a JME dev environment quickly is something that Sun got surprisingly right. Just get NetBeans with the JME pack and there is a regular emulator right in the IDE, and then you can hook in other proprietary emulators such as those from Motorolla.
Not sure what kind of apps you are looking to do, but if you're interested in games I thought Beginning Mobile Phone Game Programming was a great starting point:
Perhaps Motorola's own site
link
I have not used the new Motorola development studio, because my experience with Motorola's development tools has not been a joyous one. When working with Motorola devices I tend to stick to the standard emulator (or sometimes the Sony Ericsson emulators as those are the best I have worked with by far).
The problem with Motorola's tools is that I always seemed to spend way too much time trying to figure out how to work around them. I would run into emulator specific issues and bugs, and I honestly don't have time to waste trying to figure out why the application runs on the target device but crashes on the emulator. It should be the opposite.
A good emulator is very important for mobile development though as that is where you will do 90% of your development, testing and tweaking, only periodically trying it out on the phone.
Finally, I agree with bpapa...Netbeans is an excellent IDE for J2ME development and here is a book that I recommend (get the original if possible, not the second edition as the second edition focuses way too much on MIDP 2.0 and assumes you know the basics).
http://www.amazon.com/J2ME-Game-Programming-Development/dp/1592001181/ref=pd_bbs_sr_3?ie=UTF8&s=books&qid=1221692983&sr=1-3
Yeah, the act of asking the question pointed me in the direction of an answer, and I found this:
https://developer.motorola.com/docstools/motodevstudio/
I could still use some pointers from someone of what to expect if anyone has done this before.

Categories