Android :: Droid Application Crashes / What To Do?

Jan 18, 2010

I am trying to run an application on an android emulator, but it crashes. i am following a howto

i don't know what to do, it just crashes. other applications are running fine, can anyone tell me what i am doing wrong.here is the code...

Android :: Droid Application Crashes / what to do?


Android :: Droid Application Crashes / What I Am Doing Wrong?

Jan 18, 2010

I am very new to android programming. i was following a guide in here, to create an application that shows the current location, i did as was told in the guide, but whenever i try to run it, it crashes, and asks for "force Close",
does somebody know what i am doing wrong? here is the code....

View 2 Replies View Related

Android :: Droid Application Crashes When Button Is Clicked / Fix It?

Oct 19, 2010

I am writing an android application that check the username and the password of the user once a login button is clicked

i run the app in the emulator and when i click on login button the application is crashed code...

View 1 Replies View Related

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 :: Use Map In My Application - Crashes With Error

Dec 7, 2009

I want to use a map in my application but I can't get it to run.

It always crashes with the following error:

CODE:.....

My XML file:

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

My layout:

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

In my code I add the map like this:

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

View 5 Replies View Related

Android :: AlertDialog Crashes Application / Why Is So?

Jun 17, 2010

Can someone explain to me why this AlertDialog crashes? code...

View 1 Replies View Related

Android :: Toast Crashes Application / What To Do?

Nov 19, 2010

In my application I've implemented such that pressing the hardware volume keys displays a Toast with the current volume. Things go well most of the times. However long presses of the volume keys do succeed in crashing my application. The Log generated on crash is the following...

The approach I follow:
I have a toast Object and for every key press event detected I inflate a view ,set the view elements within, set it to the toast and then show the toast.

Any idea what is going wrong ? code...

View 1 Replies View Related

Android :: Application Crashes When Orientation Changes - Fix It?

May 26, 2010

My app crashes when the device orientation changes..Tried debugging on real device, but I have no clue where the crash exactly happens.. I would appreciate if someone could throw some light on this:

Below is the error log...

View 2 Replies View Related

Android :: Camera Application Preview Crashes

Nov 24, 2010

So I started with this little write-up. I wanted to try to make an application that will take pictures while running in the background. To start though I wanted an application that once opened would simply take a picture every X seconds. After recreating the classes and methods show in the walk through below I ran into a few problems.
http://itp.nyu.edu/~sve204/mobilemedia_spring10/androidCamera101.pdf

For starters its seems that the onCreate function sets up all the objects for the application, but if you try to take a picture through any other method than onClick (IE directly calling it) the application actually hasn't setup the canvas or the preview yet.

My first question:
Is there any conditional method that you can setup that will wait till all the "onCreate" objects are created and their associated methods are called and finished? How do I wait for the application to finish putting together my surface and starting the cameras preview before automatically starting to take pictures?

My second question:
I am required to have a preview available to take pictures. Is there anyway to push this application to the back (IE running in the background) while still taking pictures? Is drawing to a canvas a requirement? (From what I can tell AFAIK, you are required to have a surfaceholder to start preview, when you put up another screen or application that pauses the current application and closes the surface/canvas you were presenting that preview on). If my understanding is correct on all of this the best I will be able to do is make a 1x1 pixel canvas that will still take up the screen due to the application being in the foreground.

My Third question:
Is there any way around this? Can you still utilize the camera in some fashion without requiring the preview be drawn?

View 1 Replies View Related

Android :: Camera Flash In 1.5 And 1.6 - Application Crashes

May 21, 2010

My app is using the camera on the phone. For phones w/ 2.0+ I have been able to activate the Flash. When I test on a phone with 1.5 OS on it the app crashes. I get: java.lang.reflect.InvocationTargetException and the Cause is java.lang.VerifyError: fishers.Nav.TakePicture$1
I assume because you have to access the flash differently in apps below 2.0? Can anyone give me some advice or links to examples showing how I could make it work over the whole range of Operating System version or is that just not at all do-able?

View 5 Replies View Related

Android :: Application Crashes When Trying To Play Media

Nov 11, 2010

I have a small mp3 (326KB) in my res/raw folder. In my code, I have mPlayer = MediaPlayer.create(FakeCallScreen.this, R.raw.sample); Player.prepare(); mPlayer.start(); The application just crashes when it tries to start the activity, I cannot figure out why.

View 2 Replies View Related

Android :: Application Crashes On Device Boot

Sep 20, 2010

I have registered a Receiver component for ON_BOOT_COMPLETED broadcast, in my application. The receiver does just prints a line in its onReceive() callback. However, when I boot the emulator(by executing Run as->Android application command from Eclipse) and unlock the screen on start up, I get an ANR dialog displayed in my Application. Following are the exceptions logged:

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

View 4 Replies View Related

Android :: Playing Multiple Sounds - Application Crashes

Jun 14, 2010

Shown are a few lines of code. If I play a single sound, it runs fine. Adding a second sound causes it to crash.

private SoundManager mSoundManager;
/** Called when the activity is first created. */
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.layout.sos);
mSoundManager = new SoundManager(); mSoundManager.initSounds(getBaseContext());
mSoundManager.addSound(1,R.raw.dit); mSoundManager.addSound(1,R.raw.dah);
Button SoundButton = (Button)findViewById(R.id.SoundButton);
SoundButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) { mSoundManager.playSound(1);
mSoundManager.playSound(2); } } ); }

View 1 Replies View Related

Android :: Market And Gmail Application Crashes On Launch

Jan 25, 2010

I have a G1 Android that's been rooted. My problem is that Market and Gmail crashes on launch. I also cannot get to the Data Synchronization page. It displays the page for a split second and then instantly closes out. Is there a way to reset the apps? I've tried factory reset and upgrading to a newer version of Cyanogen mod without success.

View 1 Replies View Related

Android :: Screen Orientation / Shake Cellphone Crashes Application

Jan 15, 2010

I am having search application, which loads data retreived from the webservice.While application on create it shows progress dialog once its done with loading data it dismiss the progress dialog.problem is while loading if i change the orientation of the phone it works fine it try to load activity again, but if i start shaking the cellphone while it is loading data application get crashed, any solution?

View 1 Replies View Related

Android :: Crashes - Blank Screens When Running OpenGL Application

Jan 14, 2010

I'm nearly ready to publish my OpenGL game. I've been browsing this newsgroup and I've seen quite a few posts regarding crashes, blank screens, etc when running an OpenGL application on the Droid. I have three questions:

1) What are some common pitfalls that occur when trying to support the Droid/Nexus One? So far, I've tested my game on the Android 2.0 emulator (both WVGA & FWVGA) and everything works fine but I'm still paranoid.

2) I've placed my textures (png) in the assets folder. Will these images be pre-scaled automatically? I've read about specifying density independent images for resources but do the same rules apply for images stored in the assets folder? I'm afraid that pre-scaling will cause my textures to become non-power of 2.

3) What additional strategies have developers been taking to ensure their application works on the newer devices when they only have access to G1/G2 hardware?

View 10 Replies View Related

Android :: Simple Binary Text Clock - Application Crashes?

May 13, 2010

I want to create a simple android binary clock but my application crashes. I use 6 textview fields: 3 for the decimal and 3 for the binary representation of the current time (HH:mm:ss).

Here's the code:

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

View 1 Replies View Related

Android :: Custom ListAdapter Extending BaseAdapter Crashes On Application Launch

Mar 23, 2010

Data being pulled from a local DB, then mapped using a cursor. Custom Adapter displays data similar to a ListView. As items are added/deleted from the DB, the adapter is supposed to refresh. The solution attempted below crashes the application at launch.

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

Errors:

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

View 3 Replies View Related

Android :: Application Crashes When User Presses Back Button / Where To Put Code?

Oct 6, 2010

First of all, maybe i went about this the wrong way in the first place. Situation is, i have a listview that when an item is clicked, it creates an intent and calls startActivityForResult() to another activity, to be able to edit the entries in the row. and that other activity after editing the required values, returns back to the calling activity, when the user clicks on a save button. The activity then uses the row Id to update the item.My problem now is that, if the user presses the BACK button instead, the application crashes. i have been looking around and see solutions like using Shared Preferences or onSavedInstanceState(), but i don't know where exactly i should be putting the code?

View 1 Replies View Related

HTC Incredible :: Frequent Crashes - Application

Aug 9, 2010

My Incredible has recently started to crash frequently and it seems to keep getting worse, now at least once or twice per day. It never crashes while I am using it, but I will go to check it later and it is dead. This is getting frustrating because I am missing calls without even knowing the phone is off. I either have to pop the battery or plug into power to force a reboot. Im not sure how to figure out what application might be causing the problem or if maybe it is a hardware issue. Does anyone have any idea what might be causing this, or know what I might do to start troubleshooting?

View 2 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 :: Android Bluetooth Crashes Application When Remote Device Closes Socket

Feb 16, 2010

I have connected my Android application to a Windows desktop machine via Bluetooth. The application interacts with the machine. At the end of the interaction the application on the desktop closes the socket that was opened between the Android and the desktop application. Right when socket.close() is called on the Windows machine my Android app pops open a dialog saying that the application has stopped unexpectedly and then it quits. I have a breakpoint on the line in the ConnectedThread (like in the BluetoothChat sample) where I read the InputStream on the Android and that is not hit. I also have a breakpoint in the catch statement for the try surrounding the place where I read the InputStream. That one also does not get hit. So I have no idea how I can catch this error. Is this a bug?

View 2 Replies View Related

Android :: Application Crashes While Doing AlertDialog.Builder Create() Method - Android

Aug 18, 2010

I am testing my application on an LG Eve phone. I have an application that tries to download something from the web, and when it throws an exception, it is supposed to launch an alertdialog saying that there was an error. When the phone has no wifi signal, the program crashes at builder.create() (see code below). However, when there is wifi signal, and the exception is thrown by something else (for instance, a typo in the url), the dialog launches the way it's supposed to. Any clue as to why this could be?

Code for onCreateDialog:

@Override
protected Dialog onCreateDialog(int id){

Dialog d = null;
switch (id){...............

View 1 Replies View Related

Android :: Android Market Place Crashes On Receiving Intent For An Application That Doesn't Exists In Marketplace

Mar 25, 2010

I am creating an application that checks the installation of a package and exits after launching the market-place with its id.

When I try to launch market place with id of an application say com.mybrowser.android by throwing an intent android.intent.action.VIEW with url: market://details?id=com.mybrowser.android, the market place application does launches but crashes after launch.

The application com.mybrowser.android doesn't exist on the market- place.

MyApplication is my application.

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

However, when I try to launch the market place for a package that exists in the market place say com.opera.mini.android, everything works. Here is the log of this case:

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

View 6 Replies View Related

Android : Way To Catch Crashes In Own Droid App?

Apr 16, 2010

Is there any way to catch crashes in my own android app? Something like a global uncaught exception handler? Just wondering if I could install something like that, then if an uncaught exception is thrown, I could pop up a dialog for the user and ask if they want to mail a dump of the exception to me.

View 2 Replies View Related

Android :: App Crashes On Droid - Works Fine On G1

Jan 7, 2010

I'm having a problem where my app crashes on the Droid and seems to work fine on the G1. We have a G1 dev phone but do not have access to a Droid phone, so the issue is difficult to debug at this stage.

The app loads up the main screen okay, but once the user moves beyond the main screen, the app crashes. Moving beyond main screen initiates the following:

- GPS signal acquired - Accelerometer sensor listener active - Geomagnetic sensor listener active - Camera preview active

I have a suspicion that the issue may be related to the camera preview. With the G1, it didn't seem to matter how I set the camera preview size, so I just made it fit the size of the view.

Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewSize(w, h); //where w, h are the width and height.

One possibility is that with the Droid having a larger screen resolution to the G1, it may be setting the preview size to something that is not supported. I plan on addressing this, but I have a few questions that I was hoping someone could shed some light on.

1. If the app attempts to set a preview size that is not supported, will it just be ignored or will the app crash?

2. If the preview size is smaller than the surface that is holding the preview, will the image be stretched to fill the surface?

3. Can anyone think of anything else that may be related specifically to the Droid that could be causing me problems?

View 8 Replies View Related

Android :: Droid WebView Crashes When Clicking On A Link / Fix It

Oct 13, 2009

I have some WebView widgets inside my Activity. I use loadData() to set the content, and this html contains a link. Some of my WebViews work okay, when I click the link, the web browser is started in a new window, but some make my app crash when I click on a link.

10-13 08:45:24.257: ERROR/AndroidRuntime(751): Uncaught handler: thread main exiting due to uncaught exception
10-13 08:45:24.308: ERROR/AndroidRuntime(751): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.app.ApplicationContext.startActivity(ApplicationContext.java:627)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.content.ContextWrapper.startActivity(ContextWrapper.java:236)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:185)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:277)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.os.Looper.loop(Looper.java:123)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at android.app.ActivityThread.main(ActivityThread.java:3948)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at java.lang.reflect.Method.invokeNative(Native Method)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at java.lang.reflect.Method.invoke(Method.java:521)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
10-13 08:45:24.308: ERROR/AndroidRuntime(751): at dalvik.system.NativeStart.main(Native Method)

There seems to be a problem with the Intent that the WebView fires when I click the URL, but I have no control of this Intent, I think. Does anybody have any idea?

I use this AsyncTask to set the content in the WebView, and it works fine.code...

View 1 Replies View Related

Android :: Droid App Crashes Due To Low Memory / Stop A Thread Before Completion?

Nov 11, 2010

My application is basically a image viewer. It is opened from both camera and as a separate application.

I open the image viewer to view and edit the picture. Each edit operation is implemented using thread. If my application closes due to pressing the home button, the next time I open it with camera. It throws anr.

This doesn't always happen. Only when large edit operations or edit operations on large image files are done.

I get out of memory error, sometimes timeout.

I guess it s because the thread doesn't complete the edit operation when home is clicked. and it s still running on the background. so when i open it s unable to process it.

m I right?

If so what is the way to stop a thread before the completion?

View 3 Replies View Related

HTC Droid Eris :: Pandora Crashes

Jun 1, 2010

When I pause Pandora for more than a few minutes, the widget absolutely refuses to respond and I have to kill Pandora with a task killer (this is the sole reason I keep the tk around) and then I have to use the icon instead of the widget to restart it.

When it crashes, I have to hit the widget like 7 or 8 times to get it to open up full screen. Then I can hit the 'Like' or 'Dislike' button and they will turn blue for a second but no check appears and the play button does absolutely nothing till I go in and do the kill thing. If I try to just hit the icon before killing it, it opens up full screen does the exact same unresponsive thing.

View 3 Replies View Related

Motorola Droid :: Email App Crashes On Attachments

Nov 7, 2009

I have my yahoo account setup in the android email app. Thanks to a previous post got it working beautifully.. when i click an email that has an image attachement and chose the Save function, its then shows the crash/error messege "The application Email (process com.android.email) has stopped unexpectedly. Please try again."Ive tried numerous emails in my yahoo account with pics and it crashes it every time. No idea why. When i open an image in my gmail account using the gmail app its saves fine.

View 1 Replies View Related







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