app not running in 2.2

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

app not running in 2.2

Postby nimi » Mon Oct 11, 2010 12:33 pm

hi. i have made an app which ha min sdk version 3 and target sdk version 2.2. it has 2 services which start on boot time. now when i run the app on 1.6 than it is running fine but as i run the app on 2.2 my service got start but crash after some time? plz help me why this is happening.. my logcat for this is following for 2.2...

I/PackageManager( 58): Removing non-system package:com.company.cellSafetyThreeZone
I/Launcher.Model( 126): not binding apps: no Launcher activity
D/dalvikvm( 126): GC_EXPLICIT freed 4775 objects / 266120 bytes in 118ms
D/PackageManager( 58): Scanning package com.company.cellSafetyThreeZone
I/PackageManager( 58): Package com.company.cellSafetyThreeZone code Path changed from /data/app/com.company.cellSafetyThreeZone-1.apk to /data/app/com.company.cellSafetyThreeZone-2.apk; Retaining data and using new

I/PackageManager( 58): /data/app/com.company.cellSafetyThreeZone-2.apk changed; unpacking

D/installd( 34): DexInv: --- BEGIN '/data/app/com.company.cellSafetyThreeZone-2.apk' ---

this is not happening in 1.6...plz help me why?
nimi
Junior Developer
Junior Developer
 
Posts: 10
Joined: Tue Sep 21, 2010 8:09 am

Top

Re: app not running in 2.2

Postby Sathasivan » Mon Oct 11, 2010 2:33 pm

hi nimi,
its difficult to find only with exception. can you post your menifest.xml here?
User avatar
Sathasivan
Experienced Developer
Experienced Developer
 
Posts: 67
Joined: Wed Oct 14, 2009 7:51 am
Location: Chennai

Re: app not running in 2.2

Postby nimi » Tue Oct 12, 2010 10:54 am

Sir
this is my manifest.xml file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.cellSafetyThreeZone"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name=".view.SplashScreen" 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=".view.SpeedScreen"></activity>
<activity android:name=".view.AlertAfter"></activity>

<receiver android:name=".controller.IncomingCallReceiver">
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
</receiver>
<receiver android:name=".controller.LocationReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name=".controller.OutGoingCallReceiver"
android:permission="android.permission.PROCESS_OUTGOING_CALLS">
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>

<receiver android:name=".controller.InComingSmsReceiver">

<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>

<receiver android:name=".controller.OutGoingSmsReceiver">

<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />

</intent-filter>
</receiver>


<service android:name=".model.CheckLocation">
<intent-filter>
<action android:name="com.company.cellSafetyThreeZone.model.CheckLocation"/>
</intent-filter>
</service>

<service android:name=".model.OutGoingSmsService">
<intent-filter>
<action android:name="com.company.cellSafetyThreeZone.model.OutGoingSmsService" />
</intent-filter>
</service>

</application>
<uses-sdk android:minSdkVersion="3" />

<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.READ_SMS"></uses-permission>
<uses-permission android:name="android.permission.WRITE_SMS"></uses-permission>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"></uses-permission>
<uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS"></uses-permission>
</manifest>
nimi
Junior Developer
Junior Developer
 
Posts: 10
Joined: Tue Sep 21, 2010 8:09 am

Re: app not running in 2.2

Postby Sathasivan » Tue Oct 12, 2010 12:04 pm

hi nimi,

sorry i could not find the error, it may not easy to find the error with manifest file. but i have some ideas, please try it.

1. change fill_parent to match_parent in all the layouts.
2. clean your project and re-run.
3. try to add the intent-filter for these activities
<activity android:name=".view.SpeedScreen"></activity>
<activity android:name=".view.AlertAfter"></activity>

i am not sure these may solve the issue, but try this. all the best.....
User avatar
Sathasivan
Experienced Developer
Experienced Developer
 
Posts: 67
Joined: Wed Oct 14, 2009 7:51 am
Location: Chennai

Re: app not running in 2.2

Postby nimi » Wed Oct 13, 2010 5:18 am

thanks... i will try it. but still i don't think it will work. which intent filter i have to add in activities. please explain.... :)
nimi
Junior Developer
Junior Developer
 
Posts: 10
Joined: Tue Sep 21, 2010 8:09 am

Re: app not running in 2.2

Postby Sathasivan » Wed Oct 13, 2010 8:19 am

Sathasivan wrote:hi nimi,

sorry i could not find the error, it may not easy to find the error with manifest file. but i have some ideas, please try it.

1. change fill_parent to match_parent in all the layouts.
2. clean your project and re-run.
3. try to add the intent-filter for these activities
<activity android:name=".view.SpeedScreen"></activity>
<activity android:name=".view.AlertAfter"></activity>

i am not sure these may solve the issue, but try this. all the best.....


add just like this,

<activity android:name=".view.SpeedScreen">
<intent-filter android:label="@string/resolve_edit">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity android:name=".view.AlertAfter">
<intent-filter android:label="@string/resolve_edit">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
User avatar
Sathasivan
Experienced Developer
Experienced Developer
 
Posts: 67
Joined: Wed Oct 14, 2009 7:51 am
Location: Chennai

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 1 guest