Apps crashes on emulator

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

Apps crashes on emulator

Postby dev78 » Tue Nov 30, 2010 5:45 am

Hello, I have a app that i want to test. When I run it i receive no compile errors from the java code. For some reason it crashes upon load. I compiled with pulsar eclipse. I receive and error on the error log "No command output when running: 'am start -n app1.test/app1.test.App1 -a android.intent.action.MAIN -c android.intent.category.LAUNCHER" Can someone help me?
dev78
Freshman
Freshman
 
Posts: 5
Joined: Tue Nov 30, 2010 5:41 am

Top

Re: Apps crashes on emulator

Postby andreleitao » Wed Dec 01, 2010 11:36 pm

dev78, does your AndroidManifest file has a main activity? You must have a main activity to run your project. Something like this (in AndroidManifest file, inside <application> tag):

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2.        <activity android:name=".TestActivity"
  3.                  android:label="@string/app_name">
  4.                   <intent-filter>
  5.                 <action android:name="android.intent.action.MAIN" />
  6.                 <category android:name="android.intent.category.LAUNCHER" />
  7.             </intent-filter>
  8.         </activity>
  9.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Be sure if your RUN CONFIGURATIONS window relative to your project references the main activity you want.
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Re: Apps crashes on emulator

Postby dev78 » Thu Dec 02, 2010 12:01 am

Here is my AndriodManifest.xml. Is it missing something?


Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2.       <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.      package="com.golf"
  4.      android:versionCode="1"
  5.      android:versionName="1.0">
  6.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  7.         <activity android:name=".GolfScore"
  8.                  android:label="@string/app_name">
  9.             <intent-filter>
  10.                 <action android:name="android.intent.action.MAIN" />
  11.                 <category android:name="android.intent.category.LAUNCHER" />
  12.             </intent-filter>
  13.         </activity>
  14.  
  15.     </application>
  16.  
  17.  
  18. </manifest>
  19.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
dev78
Freshman
Freshman
 
Posts: 5
Joined: Tue Nov 30, 2010 5:41 am

Re: Apps crashes on emulator

Postby andreleitao » Thu Dec 02, 2010 12:32 am

Hi, dev78. I really never seen this error before. In your place I would:

- create a new project from the scratch (Android 1.6 - minimum)
- create an AVD for Android 1.6
- copy the content of your project (Golf) to this new project.

If you have doubts about creating a new project, try to see this post of mine:

http://androidwings.wordpress.com/2009/ ... -5-or-1-6/

Hope it helps. =)
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Re: Apps crashes on emulator

Postby dev78 » Thu Dec 02, 2010 12:54 am

I found that the problem is the .java. It doesn't have errors but there something in the .java file that is making it crash. Does anyone know any good sites for Android java development for beginners?
dev78
Freshman
Freshman
 
Posts: 5
Joined: Tue Nov 30, 2010 5:41 am

Re: Apps crashes on emulator

Postby andreleitao » Thu Dec 02, 2010 2:56 am

Wow, it's weird for me... Humm, to be honest with you I recommend you keep focused on WHAT you want to develop. For example: "humm, for my first application I want to develop a game...". Then you begin to search for techniques that can help you to develop a game with Android. Sincerely, many problems of my Android development life have been solved here at anddev.org.

But you want websites, right? Maybe I'm not the best user to indicate some sites for Android beginners, but sometimes I like to consult this tutorial for Android layout: http://www.learn-android.com/.../androi ... -tutorial/

Well, this is the tip: choose the problem you want to solve and certainly you will find the answer in the web. But, of course, once you are a beginner you MUST to read the official documentation (http://developer.android.com/index.html) to understand Android basics, right?

Good luck! =D

Best regards
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Top

Re: Apps crashes on emulator

Postby dev78 » Thu Dec 02, 2010 3:04 am

Maybe another problem is the tool that i'm using. I use eclispe pulsar. Is that recommended?
dev78
Freshman
Freshman
 
Posts: 5
Joined: Tue Nov 30, 2010 5:41 am

Re: Apps crashes on emulator

Postby andreleitao » Thu Dec 02, 2010 3:13 am

Hummm, really good question... try Eclipse HELIOS.
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Re: Apps crashes on emulator

Postby dev78 » Thu Dec 02, 2010 3:17 am

OK. I will thanks for the info
dev78
Freshman
Freshman
 
Posts: 5
Joined: Tue Nov 30, 2010 5:41 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 8 guests