tags:

views:

57

answers:

3

I changed some code on an android application that was working perfectly fine at least 3 days ago (note, this was not three days of coding, I have not done THAT many changes). Now, instead of running along on its merry way, it is ambushed and killed as soon as it gets out of the door. At least, I think that I am interpreting the output correctly:

[2010-08-06 14:07:04 - chart] Android Launch!
[2010-08-06 14:07:04 - chart] adb is running normally.
[2010-08-06 14:07:04 - chart] Performing org.achartengine.chartdemo.demo.ChartDemo activity launch
[2010-08-06 14:07:04 - chart] Automatic Target Mode: using device 'HT03LHF01264'
[2010-08-06 14:07:04 - chart] WARNING: Application does not specify an API level requirement!
[2010-08-06 14:07:04 - chart] Device API version is 3 (Android 1.5)
[2010-08-06 14:07:04 - chart] Uploading chart.apk onto device 'HT03LHF01264'
[2010-08-06 14:07:04 - chart] Installing chart.apk...
[2010-08-06 14:07:08 - chart] Success!
[2010-08-06 14:07:08 - chart] Starting activity org.achartengine.chartdemo.demo.ChartDemo on device 
[2010-08-06 14:07:11 - chart] ActivityManager: Can't dispatch DDM chunk 46454154: no handler defined
[2010-08-06 14:07:11 - chart] ActivityManager: Can't dispatch DDM chunk 4d505251: no handler defined
[2010-08-06 14:07:12 - chart] ActivityManager: Starting: Intent { action=android.intent.action.MAIN categories={android.intent.category.LAUNCHER} comp={org.achartengine.chartdemo.demo/org.achartengine.chartdemo.demo.ChartDemo} }
[2010-08-06 14:07:12 - chart] ActivityManager: [1]   Killed                  am start -n org....

Anyway, does anybody have ideas as to what might be causing the immediate killing of a program?

Problem identified by Aidanc. The manifest file that was giving me trouble was

 <?xml version="1.0" encoding="utf-8" ?> 
- <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.achartengine.chartdemo.demo" android:versionCode="1" android:versionName="1.0.0">
- <application android:icon="@drawable/icon" android:label="@string/app_name" android:permission="android.permission.CAMERA">
- <activity android:name=".ChartDemo" android:label="AChartEngine demo">
- <intent-filter>
  <action android:name="android.intent.action.MAIN" /> 
  <category android:name="android.intent.category.LAUNCHER" /> 
  </intent-filter>
  </activity>
  <activity android:name="org.achartengine.chartdemo.demo.chart.XYChartBuilder" /> 
  <activity android:name="org.achartengine.GraphicalActivity" /> 
  <activity android:name=".GeneratedChartDemo" /> 
  <activity android:name="DisplayImage" /> 
  </application>
  <uses-permission android:name="android.permission.CAMERA" /> 
  <uses-feature android:name="android.hardware.camera" /> 
  <uses-feature android:name="android.hardware.camera.autofocus" /> 
  <uses-sdk android:minSdkVersion="3" /> 
  </manifest>
+3  A: 

perhaps a permissions problem? Have you set permissions correctly for the code you added in the Manifest file? its hard to tell without seeing some code. We need to know what exactly your program does at launch?

Also, whats the Log cat output? does anything run? what's it showing there? does an error show? if it does could you edit your question and put it there?

//edit

<application android:icon="@drawable/icon" android:label="@string/app_name" android:permission="android.permission.CAMERA">

Trying removing android:permission="android.permission.CAMERA" from this

Aidanc
The log cat output is exactly the same as the console output, which I already included in the question. It does seem like it is a permissions problem. I tried just rolling back the manifest file to before I tried to give it permission to access the camera, and it runs again. I'll edit the question to give you a before and after.
Aviendha
updated my question.
Aidanc
Awesome. Worked like a charm. Thank you.
Aviendha
A: 

Your log says:

WARNING: Application does not specify an API level requirement!

That's quite a problem. There may be something wrong in your manifest around <uses-sdk />

If not, then you could also try Project/Clean in Eclipse to rebuild everything.

Olivier
A: 

As oliver said, that is a serious problem.

Also I highly highly recommend the use of a version control system to track any and all changes made to your code base. For example GIT or SVN. I think SVN integrates into Eclipse better. That way you could just diff between two versions and know immediately what changed.

Brad Hein
Ya, at the beginning of this project, I decided that I did not want to take the time to set up subclipse, a decision that I am regretting now. I was using Dropbox's rollback feature as a primitive sort of version control. I shall not do so ever again. :)
Aviendha
assembla.com is a nice free SVN repo
Aidanc