App Crashes When It Starts

Sep 24, 2012

whenever i start this app it crashes after about 5 seconds. I am quite desperate because I couldnt find the error/ mistake yet.

Code:
package de.example.adorassprachausgabe;
import java.util.Locale;
import android.os.Bundle;
import android.app.Activity;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.view.View.OnClickListener;
import android.widget.Button;

[code]....

App crashes when it starts


Android :: Application Crashes Before It Starts

Nov 16, 2010

intentTest.java:
package intentTest.xyz.com;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button
public class intentTest extends Activity {
Button b;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
b = (Button) findViewById(R.id.b);
b.setOnClickListener( new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(intentTest.this,seond.class );
startActivity(intent);
}});
}}
main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="First screen"
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="click"
android:name="@+id/b"
/>
</LinearLayout>
seond.java:
package intentTest.xyz.com;
import android.app.Activity;
import android.os.Bundle;
public class seond extends Activity{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.second);
} }
second.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="second screen"
/>

manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="intentTest.xyz.com"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".intentTest"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".seond"></activity>
</application>
</manifest>

I get the following error code:
11-16 01:26:07.156: ERROR/AndroidRuntime(779): Uncaught handler: thread main exiting due to uncaught exception
11-16 01:26:07.166: ERROR/AndroidRuntime(779): java.lang.RuntimeException: Unable to start activity ComponentInfo{intentTest.xyz.com/intentTest.xyz.com.intentTest}: java.lang.NullPointerException
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2417)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.access$2100(ActivityThread.java:116)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.os.Looper.loop(Looper.java:123)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.main(ActivityThread.java:4203)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at java.lang.reflect.Method.invokeNative(Native Method)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at java.lang.reflect.Method.invoke(Method.java:521)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at dalvik.system.NativeStart.main(Native Method)
11-16 01:26:07.166: ERROR/AndroidRuntime(779): Caused by: java.lang.NullPointerException
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at intentTest.xyz.com.intentTest.onCreate(intentTest.java:18)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2364)
11-16 01:26:07.166: ERROR/AndroidRuntime(779):
... 11 more

View 5 Replies View Related

Android :: Activity Crashes When Remote Service Crashes

Jul 16, 2010

I'm trying to understand remote services at the moment and everything works fine, i can start the service and know how to communicate with it through the AIDL-interface. My problem is that the service seems to still run in the same process like the activity it was started from, because the activity crashes too, if there is an error thrown in the Service.

I set the service process to remote ( android:process=":remote" ) so what am i doing wrong? Or what do i have to do to unbind the service-process completely from the activity-process?

View 1 Replies View Related

Android :: How To Run Something Only When Application Starts?

Mar 27, 2010

I have a dialog popup to indicate how long I want an activity to run.Seems simple enough, but its difficult to determine when the activity is really starting.If the user opens the keyboard on a G1 and thereby goes into landscape, that reruns the activities onCreate method.I can't have a static for the class or even create an application class, because I can't determine when the 'application' goes away. Even after destroying the only activity, the application is apparently still alive.Is there a way to determine that onCreate has been called because of the keyboard being extended or landscape mode invoked?

View 3 Replies View Related

HTC Hero :: Unwated App Starts

Oct 18, 2009

Strange behavior on my Sprint Hero - apps I haven't asked to start, suddenly appear in my Tasklist, after sitting on a charger for extended periods of time... Example: Today, while the phone was sitting on my desk and I had just force-closed a few apps, the Navigation, Calendar and Clock apps all started to run. The phone screen was off, sitting on a table and I had just confirmed that NONE of those apps were running before I turned off the phone.

Is this a bug in the Hero overall, just the SpLint implementation or something with just my phone?

View 1 Replies View Related

LG Eve :: Ringtone Starts Really Low And Gets Higher?

Feb 18, 2010

Who else is really annoyed with the fact that when the EVE rings, it starts really low and gets higher?

View 5 Replies View Related

HTC EVO 4G : Before Bad Battery Advice Starts

Jun 4, 2010

Do not discharge lithium-ion too deeply. Instead, charge it frequently.Lithium-ion does not have memory problems like nickel-cadmium batteries.No deep discharges are needed for conditioning.I know once the battery bashing starts there will be 1000 suggestions to deep cycle batteries. Android may benefit from a discharge cycle, but I can't find anything authoritative on this yet. Perhaps a developer can help?

View 3 Replies View Related

Samsung Captivate :: Ringer Starts Out Really Low

Sep 13, 2010

I switched from an iPhone & love it so far but my only issue is when people call me my ringer is so low at the start then after about 5 seconds goes to the volume I have it set on... I looked all over the settings and theres nothing about ascending ringer checked or anything... this is just buggin' the heck out of me..

View 14 Replies View Related

Motorola Droid :: Navigation Starts Up On Its Own

Sep 27, 2010

For some reason, the navigation app will just start it self up. I thought maybe I was accidentally touching the shortcut on my home screen so I removed it, but it still happens. I "went along with it" as it asked me to show my gps settings since I have gps disabled. So I enabled it to see if it would bring me to a map, but it just brings me to the default navigation screen. Running 2.2, stock rom, but super user access.

View 4 Replies View Related

Motorola Milestone :: MP3 Player Starts By Itself

May 26, 2010

I have a Milestone (DE Version from Amazon) size Christmas and have a annoying problem: Sometimes the Musik Player starts all by itself. Telephone is on standby in my pocket, then for no apperent reason the mp3 player goes off playing.

The same problem was reported here. I had this problem since FW 2.0. It happens maybe one per week, but is really annoying in meetings since the mp3 player app ignores ringer volume settings.
I too found that it happens a lot more if i just pull the audio jack plug to stop playback, but even so it happens from time to time...

View 2 Replies View Related

Android :: WebView Starts With A Delay

Feb 6, 2009

I am using WebView in a number of screens in my application, and notice that it takes couple of seconds when starting up for the first time. What can I do to speed it up besides trying to create one in a separate thread beforehand?

View 3 Replies View Related

Android :: App To Choose What Starts Up At Boot

Aug 16, 2010

I have a number of app's that seem to start and run at random.

I still want these apps on the on phone, so don't want to uninstall, just want to be able to choose when they start up - rather than them starting at random and running in background.

Some of the app's running:

Music
Footprints
Stocks
FM Radio
Juiceplotter
Fake-call-me-Pro

Is there an APP similar to AUTORUNS (which I use on my Windows PC) that lets me choose what programs run at boot?

View 3 Replies View Related

HTC EVO 4G :: As Connect To 4g Network / Phone Starts To Lag

Nov 12, 2010

Every time I connect to the 4g network here in NY, my phone starts to lag horribly. Nothing is as snappy from the home screen scrolling to the keyboard to any apps that require a network connection.

View 11 Replies View Related

HTC EVO 4G :: GTalk Starts Up Automatically After Update?

Jul 10, 2010

I definitely did not want to make a thread about this because I'm certain it has to have been made before, but I searched and searched and couldn't find a thread, so here goes.Ever since the update (the one like two weeks ago, the one that caused crashes and they pulled but eventually put back up) GTalk starts itself automatically. I already changed the settings so that it wouldn't start, and everything was great. But since the update, it randomly starts automatically. All the settings are still set to off, but it will start up whenever it feels like it. It's gotten to the point where almost every time I pick up my phone, I have to check Running Services to turn of GTalk.This is affecting everyone, I'm guessing? Has there been any news about it? Fixes?Also, somewhat off-topic, but I've been away from the forums for about two weeks. I've been on vacation. Have I missed anything big? Have there been anymore updates, besides the one which caused the crashes (and they ended up putting it back up, right? I didn't download the still glitchy version, right?).

View 5 Replies View Related

Android :: IM - Always Starts - Funny SMSs

Oct 29, 2009

IM is automatically loaded when I start my phone. I don't use it, but don't see a way to uninstall or shut that off.

Also, I occssionally get these odd sms messages. I looked one up on the web and it said it had to do with IM. How can I stop all this IM stuff?

View 4 Replies View Related

HTC EVO 4G :: Music Starts Playing Randomly / How To Fix?

Jun 23, 2010

Had this happen twice now. If I look at the Sense music player, it's not playing. Pandora isn't open. Nothing else is happening, just... music playing. Volume does nothing. Only way I could find to turn it off was by turning the phone off.

View 13 Replies View Related

HTC EVO 4G :: Speech To Text Always Starts Lowercase?

Jun 17, 2010

The speech to text function that works in most apps (text, email etc) on the Evo has great recognition. But are there any settings or any way to get the speech to text to start a sentence with capitalization? I know you can say "period" to make it put a period at the end.

View 2 Replies View Related

Android : Email Starts Blank

Feb 2, 2010

I have a new Droid (2.0) and set-up a company non-gmail email account (which happens to be hosted by gmail). When I click on the "Email" app form Home, a blank/black screen comes up. I need to hit "Menu", "Accounts", and then select the single account in order for the Inbox to show.Is this normal? Do I have something wrong?

View 1 Replies View Related

Android : App Starts In 1.5 Emulator But Doesn't In 1.6

Apr 29, 2010

My app works on 1.5 emulator and 1.5 device. When i try to start it on 1.6 emulator, it produces strange exceptions (doesn't even start). I don't have any 1.6 device to try this app if it works on a real device.
I get some warnings in Eclipse ( warning: Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a broken compiler.) and get cant rid of them (i think they come from some apache jars that i need to make http multipart posts).

Is it possible that this jars are cause for my exceptions in 1.6 or is it something else?

My logacat:

CODE:.......................

View 2 Replies View Related

General :: Service Never Starts At Boot

Apr 14, 2014

I have 2 Mpai 809t octacore phones, almost the same specs (first one with 1gb ram and 20130303 rom version and second one with 2gb ram and rom 20130122).The most recent rom version has the Preview window perfectly working, the oldest no. I noticed that the fault is the missing Apk Suspend Window.apk and his Library (libhallwindowjni.so).

Copying the apk and library from one rom to the other does not the trick. The service never starts at boot. I tried almost everything, also copied all framework and system apk files from one rom to the other, nothing... the apk never starts at boot.I would like to develop an Ota update for this phone to fix this issue, so i would really like to understand the reason of this behavior.

View 3 Replies View Related

Motorola Droid X :: Phone Starts Rebooting On Its Own

Aug 12, 2010

After driving with my DX using nav and playing pandora at the same time,it took out of the dock and 30min later my phone starts rebooting on its own. I have taken out the battery but no avail.

View 4 Replies View Related

Android :: Activity Starts Remote Service

Oct 8, 2010

My initial activity is basically a splash screen while preforming initialization and login in to network server. To save memory I want to finish() the splash activity once it starts the main menu activity. I still want the remote service to operate. Testing shows it does. But am I going to get into trouble doing this? I know I can restart the remote from the main menu activity but I am trying to save overhead by not starting it twice. The remote service is required by the splash activity.

View 1 Replies View Related

Android :: Best Way For Service That Starts Activity To Communicate With It

Feb 16, 2010

I have a service that listens to a socket. When receiving certain input it is to create an activity. When receiving other input, it is to kill this activity. I have struggled for a while to make the service communicate with the activity through AIDL (http://developer.android.com/guide/developing/tools/aidl.html), but this seems to not be effective. I think AIDL is only effective when the process that is to be talked to is a service, not when it is an activity? I would love some directions or suggestions on how to solve my problem.

View 1 Replies View Related

Android :: How To Find Out When Activity Starts Or Get Focus?

Mar 17, 2010

I would need to know when one activity starts or get's focus. I need this notification for any activity regardless of his type, name or whatever - not searching for one specific activity. Checked the ActivityMonitor and the Intent and I haven't found a generic intent for this purpose. Or I hadn't understood well the descriptions from the Intent ACTION_xxxxx.

View 7 Replies View Related

Android :: How To Start Animation When Activity Starts?

Aug 21, 2010

I need to start a animation automatically for a activity without any user clicking. I know when activity is not ready, animation could not start. I used a thread to start it, however it is still not working.

View 4 Replies View Related

Android :: Set Focus On TextView When Activity Starts?

Aug 16, 2010

There are an EditText and a TextView in my Activity. I want to set focus on the TextView when the Activity starts. I used the following code:

TextView myTextView = (TextView) findViewById(R.id.my_text_vew);
myTextView.setFocusable(true);
myTextView.setOnClickListener(this);
myTextView.requestFocus();

But the code doesn't work. The EditText always receives focus when the activity starts.

View 1 Replies View Related

Motorola Droid :: GPS Starts Up When Launching Web Browser?

Jan 15, 2010

Anyone know why, when I launch the browser (the droid is not rooted or modified in anyway) I get the GPS icon in my notification bar? Then sometimes it will not do this or the icon will go away after a minute or so.

View 6 Replies View Related

Samsung Captivate :: Music Starts To Play By Itself / How To Fix?

Aug 20, 2010

Does anyone have this problem where when I slightly pull my earphones out of the jack, the music from my sd card starts to play automatically? Is this a feature or do I need to bring it in to get fixed?

View 2 Replies View Related

HTC EVO 4G :: Music Program Starts On Its Own When Ext. Spkr Plugged In

Aug 8, 2010

This has been going on for awhile; not Froyo related When I have Slacker Radio or Pandora on, and I plug my phone into an external speaker though the headphone jack, another music player,(Mixzing, Mspot, Double twist, etc) will start to play music that is stored on my storage card! Even if I force close it, in a minute or so it starts itself up again.. This only happens if I am running Slacker Radio or Pandora.. anyone have a suggestion? This is annoying as hell, since I like listening to Slacker/Pandora through my external speakers, but having 2 songs going at once is bizarre!!

View 4 Replies View Related

HTC Hero :: Can You Edit Items That Starts Up With Droid OS

Jan 29, 2010

Is there anyway to edit the items that starts up with the Droid OS?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved