Here my manifest? Is a manifest problem? Many many hours spent to discover the problem... is a service that starts a class by intent (using alarmmanager). If no a manifest problem, what's the problem?
Thanks for help!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mypackage"
android:versionCode="1"
android:versionName="1" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" android:name="CrashReports">
<service android:name="UnUsedService">
<intent-filter>
<action
android:name="org.gortcloud.startatboot.UnUsedService" />
</intent-filter>
</service>
<receiver android:name="AutoStart">
<intent-filter>
<action
android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>
<receiver android:name="AlarmReceiver" android:process=":remote"/>
<activity
android:name="com.example.mypackage.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:enabled="true" android:name=".SobService"/>
<activity android:name="Index"></activity>
<activity android:name="SendText"></activity>
</application>
</manifest>
logcat
E/ThrottleService( 149): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
D/dalvikvm( 149): GC_CONCURRENT freed 637K, 13% free 8307K/9479K, paused 25ms+12ms, total 142ms
D/AndroidRuntime(14611):
D/AndroidRuntime(14611): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(14611): CheckJNI is ON
D/dalvikvm(14611): Trying to load lib libjavacore.so 0x0
D/dalvikvm(14611): Added shared lib libjavacore.so 0x0
D/dalvikvm(14611): Trying to load lib libnativehelper.so 0x0
D/dalvikvm(14611): Added shared lib libnativehelper.so 0x0
D/AndroidRuntime(14611): Calling main entry com.android.commands.pm.Pm
W/ActivityManager( 149): No content provider found for permission revoke: file:///data/local/tmp/MainActivity.apk
D/dalvikvm( 2860): GC_CONCURRENT freed 457K, 14% free 5292K/6087K, paused 17ms+4ms, total 75ms
W/ActivityManager( 149): No content provider found for permission revoke: file:///data/local/tmp/MainActivity.apk
D/dalvikvm( 149): GC_CONCURRENT freed 614K, 12% free 8360K/9479K, paused 22ms+30ms, total 125ms
D/dalvikvm( 149): GC_FOR_ALLOC freed 282K, 13% free 8265K/9479K, paused 69ms, total 70ms
D/dalvikvm( 149): GC_FOR_ALLOC freed 234K, 13% free 8267K/9479K, paused 86ms, total 87ms
D/dalvikvm( 149): GC_FOR_ALLOC freed 239K, 13% free 8270K/9479K, paused 68ms, total 68ms
I/PackageManager( 149): Removing non-system package:org.gortcloud.perledisaggezza
I/ActivityManager( 149): Force stopping package org.gortcloud.perledisaggezza uid=10044
I/ActivityManager( 149): Killing proc 10610:org.gortcloud.perledisaggezza/u0a44: force stop
W/ActivityManager( 149): Force removing ActivityRecord{411fe0f0 org.gortcloud.perledisaggezza/.MainActivity}: app died, no saved state
W/InputDispatcher( 149): channel '412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
E/InputDispatcher( 149): channel '412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowState( 149): WIN DEATH: Window{412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity paused=false}
W/InputDispatcher( 149): Attempted to unregister already unregistered input channel '412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity (server)'
I/Choreographer( 149): Skipped 75 frames! The application may be doing too much work on its main thread.
I/WindowManager( 149): WINDOW DIED Window{412b50c0 org.gortcloud.perledisaggezza/org.gortcloud.perledisaggezza.MainActivity paused=false}
I/Choreographer( 258): Skipped 238 frames! The application may be doing too much work on its main thread.
I/PackageManager( 149): Package org.gortcloud.perledisaggezza codePath changed from /data/app/org.gortcloud.perledisaggezza-2.apk to /data/app/org.gortcloud.perledisaggezza-1.apk; Retaining data and using new
W/InputMethodManagerService( 149): Got RemoteException sending setActive(false) notification to pid 10610 uid 10044
I/PackageManager( 149): Running dexopt on: org.gortcloud.perledisaggezza
D/dalvikvm(14630): DexOpt: load 129ms, verify+opt 643ms, 962252 bytes
W/PackageManager( 149): Code path for pkg : org.gortcloud.perledisaggezza changing from /data/app/org.gortcloud.perledisaggezza-2.apk to /data/app/org.gortcloud.perledisaggezza-1.apk
W/PackageManager( 149): Resource path for pkg : org.gortcloud.perledisaggezza changing from /data/app/org.gortcloud.perledisaggezza-2.apk to /data/app/org.gortcloud.perledisaggezza-1.apk
D/dalvikvm( 149): GC_FOR_ALLOC freed 320K, 13% free 8281K/9479K, paused 72ms, total 73ms
I/ActivityManager( 149): Force stopping package org.gortcloud.perledisaggezza uid=10044
D/PackageManager( 149): New package installed in /data/app/org.gortcloud.perledisaggezza-1.apk
W/PackageManager( 149): Not granting permission android.permission.READ_LOGS to package org.gortcloud.perledisaggezza (protectionLevel=50 flags=0x8be46)
I/ActivityManager( 149): Force stopping package org.gortcloud.perledisaggezza uid=10044
D/dalvikvm( 204): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 258): WAIT_FOR_CONCURRENT_GC blocked 1ms
D/dalvikvm( 204): GC_EXPLICIT freed 216K, 62% free 5881K/15367K, paused 8ms+19ms, total 155ms
D/dalvikvm( 258): GC_EXPLICIT freed 409K, 39% free 7423K/12103K, paused 8ms+22ms, total 156ms
D/dalvikvm( 323): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 323): GC_EXPLICIT freed 177K, 10% free 5564K/6151K, paused 8ms+9ms, total 88ms
I/InputReader( 149): Reconfiguring input devices. changes=0x00000010
D/PackageManager( 149): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
D/PackageManager( 149): generateServicesMap(android.content.SyncAdapter): 4 services unchanged
D/BackupManagerService( 149): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:org.gortcloud.perledisaggezza flg=0x8000010 (has extras) }
D/dalvikvm( 149): WAIT_FOR_CONCURRENT_GC blocked 0ms
I/AccountTypeManager( 367): Loaded meta-data for 1 account types, 0 accounts in 53ms(wall) 5ms(cpu)
D/dalvikvm( 149): GC_EXPLICIT freed 503K, 15% free 8140K/9479K, paused 65ms+21ms, total 204ms
I/InputReader( 149): Reconfiguring input devices. changes=0x00000010
D/PackageManager( 149): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
D/PackageManager( 149): generateServicesMap(android.content.SyncAdapter): 4 services unchanged
D/BackupManagerService( 149): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:org.gortcloud.perledisaggezza flg=0x8000010 (has extras) }
V/BackupManagerService( 149): removePackageParticipantsLocked: uid=10044 #1
V/BackupManagerService( 149): addPackageParticipantsLocked: #1
W/InputMethodManagerService( 149): Found no subtypes in a system IME: com.android.inputmethod.pinyin
I/AccountTypeManager( 367): Loaded meta-data for 1 account types, 0 accounts in 11ms(wall) 7ms(cpu)
I/Choreographer( 258): Skipped 533 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 149): WAIT_FOR_CONCURRENT_GC blocked 0ms
D/dalvikvm( 367): GC_CONCURRENT freed 403K, 12% free 5471K/6215K, paused 100ms+14ms, total 174ms
W/RecognitionManagerService( 149): no available voice recognition services found
D/dalvikvm( 149): GC_EXPLICIT freed 400K, 14% free 8170K/9479K, paused 27ms+47ms, total 266ms
D/AndroidRuntime(14611): Shutting down VM
D/dalvikvm(14611): GC_CONCURRENT freed 101K, 78% free 458K/2048K, paused 2ms+1ms, total 13ms
D/jdwp (14611): Got wake-up signal, bailing out of select
D/dalvikvm(14611): Debugger has detached; object registry had 1 entries
I/AndroidRuntime(14611): NOTE: attach of thread 'Binder_3' failed
D/AndroidRuntime(14647):
D/AndroidRuntime(14647): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(14647): CheckJNI is ON
D/dalvikvm(14647): Trying to load lib libjavacore.so 0x0
D/dalvikvm(14647): Added shared lib libjavacore.so 0x0
D/dalvikvm(14647): Trying to load lib libnativehelper.so 0x0
D/dalvikvm(14647): Added shared lib libnativehelper.so 0x0
D/AndroidRuntime(14647): Calling main entry com.android.commands.am.Am
I/ActivityManager( 149): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=org.gortcloud.perledisaggezza/.MainActivity u=0} from pid 14647
W/WindowManager( 149): Failure taking screenshot for (123x221) to layer 21025
D/AndroidRuntime(14647): Shutting down VM
D/dalvikvm(14647): GC_CONCURRENT freed 102K, 77% free 489K/2048K, paused 1ms+2ms, total 11ms
D/jdwp (14647): Got wake-up signal, bailing out of select
D/dalvikvm(14647): Debugger has detached; object registry had 1 entries
I/AndroidRuntime(14647): NOTE: attach of thread 'Binder_3' failed
D/dalvikvm( 258): GC_CONCURRENT freed 539K, 38% free 7520K/12103K, paused 16ms+127ms, total 360ms
D/dalvikvm(14658): Not late-enabling CheckJNI (already on)
I/ActivityManager( 149): Start proc org.gortcloud.perledisaggezza for activity org.gortcloud.perledisaggezza/.MainActivity: pid=14658 uid=10044 gids={3003, 1028}
E/Trace (14658): error opening trace file: No such file or directory (2)
I/Choreographer( 149): Skipped 35 frames! The application may be doing too much work on its main thread.
D/ACRA (14658): ACRA is enabled for org.gortcloud.perledisaggezza, intializing...
D/ACRA (14658): Using default Report Fields
D/ACRA (14658): Looking for error files in /data/data/org.gortcloud.perledisaggezza/files
D/dalvikvm(14658): GC_FOR_ALLOC freed 179K, 9% free 5372K/5895K, paused 31ms, total 32ms
I/dalvikvm-heap(14658): Grow heap (frag case) to 5.965MB for 457616-byte allocation
D/dalvikvm(14658): GC_CONCURRENT freed 1K, 9% free 5817K/6343K, paused 19ms+13ms, total 61ms
D/dalvikvm(14658): GC_CONCURRENT freed 48K, 6% free 6322K/6663K, paused 15ms+4ms, total 65ms
D/dalvikvm(14658): WAIT_FOR_CONCURRENT_GC blocked 18ms
D/dalvikvm(14658): GC_FOR_ALLOC freed 48K, 6% free 6464K/6855K, paused 41ms, total 41ms
I/dalvikvm-heap(14658): Grow heap (frag case) to 7.234MB for 668816-byte allocation
D/dalvikvm(14658): GC_FOR_ALLOC freed <1K, 6% free 7117K/7559K, paused 58ms, total 58ms
D/dalvikvm(14658): GC_CONCURRENT freed <1K, 6% free 7117K/7559K, paused 16ms+4ms, total 64ms
I/Choreographer(14658): Skipped 58 frames! The application may be doing too much work on its main thread.
I/Choreographer(14658): Skipped 233 frames! The application may be doing too much work on its main thread.
D/gralloc_goldfish(14658): Emulator without GPU emulation detected.
I/ActivityManager( 149): Displayed org.gortcloud.perledisaggezza/.MainActivity: +1s713ms
I/Choreographer( 149): Skipped 61 frames! The application may be doing too much work on its main thread.
I/Choreographer( 149): Skipped 43 frames! The application may be doing too much work on its main thread.
I/Choreographer(14658): Skipped 271 frames! The application may be doing too much work on its main thread.
D/dalvikvm( 243): GC_CONCURRENT freed 384K, 13% free 5798K/6599K, paused 4ms+4ms, total 36ms
I/Choreographer(14658): Skipped 46 frames! The application may be doing too much work on its main thread.
I/Choreographer( 149): Skipped 36 frames! The application may be doing too much work on its main thread.
D/dalvikvm(14692): Not late-enabling CheckJNI (already on)
I/ActivityManager( 149): Start proc org.gortcloud.perledisaggezza:remote for broadcast org.gortcloud.perledisaggezza/.AlarmReceiver: pid=14692 uid=10044 gids={3003, 1028}
E/Trace (14692): error opening trace file: No such file or directory (2)
D/ACRA (14692): ACRA is enabled for org.gortcloud.perledisaggezza, intializing...
D/ACRA (14692): Using default Report Fields
D/ACRA (14692): Looking for error files in /data/data/org.gortcloud.perledisaggezza/files
D/gralloc_goldfish(14692): Emulator without GPU emulation detected.
UnUsedService (starts from my activity by:
startService(new Intent(this, UnUsedService.class));
UnUsedService
public class UnUsedService extends Service {
//private PendingIntent pendingIntent;
#Override
public IBinder onBind(Intent intent) {
return null;
}
#Override
public void onCreate() {
super.onCreate();
Toast.makeText(this, "Service Created", Toast.LENGTH_LONG).show();
//startService(new Intent(this, UnUsedService.class));
}
#Override
public void onDestroy() {
super.onDestroy();
Toast.makeText(this, "Service Destroyed", Toast.LENGTH_LONG).show();
}
private PendingIntent pendingIntent;
#SuppressWarnings("deprecation")
#Override
public void onStart(Intent intent, int startId) {
// super.onStart();
super.onStart(intent, startId);
Toast.makeText(this, "Service Started", Toast.LENGTH_LONG).show();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 32);
calendar.set(Calendar.SECOND, 0); AlarmManager am = (AlarmManager) getApplicationContext().getSystemService (Context.ALARM_SERVICE);
PendingIntent pi = PendingIntent.getService(getApplicationContext(), 0, new Intent(getApplicationContext(), AlarmReceiver.class), PendingIntent.FLAG_UPDATE_CURRENT);
am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pi);
am.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis()+1000, AlarmManager.INTERVAL_DAY, pi);
}};
Receiver:
public class AlarmReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "Alarm worked.", Toast.LENGTH_LONG).show();
}
}
I noticed that you're creating the wrong type of PendingIntent:
pendingIntent = PendingIntent.getService(UnUsedService.this, 0, myIntent, 0);
You want to target your BroadcastReceiver, so you need to use:
pendingIntent = PendingIntent.getBroadcast(AlarmReceiver.this, 0, myIntent, 0);
instead of this in your mainifest. .
try this
<activity android:name="com.example.mypackage.Index"></activity>
<activity android:name="com.example.mypackage.SendText"></activity>
Why is the debug window empty debugging an Android app that does not include a MAIN and LAUNCH activity, but only a receiver? Is it normal or there is something wrong?
When I launch the app in debug mode this is the LogCat:
10-24 13:02:52.998: D/AndroidRuntime(5782): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-24 13:02:52.998: D/AndroidRuntime(5782): CheckJNI is ON
10-24 13:02:53.108: D/dalvikvm(5782): Trying to load lib libjavacore.so 0x0
10-24 13:02:53.118: D/dalvikvm(5782): Added shared lib libjavacore.so 0x0
10-24 13:02:53.159: D/dalvikvm(5782): Trying to load lib libnativehelper.so 0x0
10-24 13:02:53.168: D/dalvikvm(5782): Added shared lib libnativehelper.so 0x0
10-24 13:02:54.324: D/AndroidRuntime(5782): Calling main entry com.android.commands.pm.Pm
10-24 13:02:54.398: D/AndroidRuntime(5782): Shutting down VM
10-24 13:02:54.418: D/dalvikvm(5782): GC_CONCURRENT freed 102K, 78% free 466K/2048K, paused 1ms+3ms, total 22ms
10-24 13:02:54.448: D/dalvikvm(5782): Debugger has detached; object registry had 1 entries
10-24 13:04:07.651: E/ThrottleService(159): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
10-24 13:05:07.188: E/MP3Extractor(39): Unable to resync. Signalling end of stream.
10-24 13:05:08.118: I/AudioService(159): AudioFocus abandonAudioFocus() from android.media.AudioManager#412af538
10-24 13:06:00.370: D/dalvikvm(220): GC_CONCURRENT freed 386K, 57% free 9099K/20743K, paused 74ms+10ms, total 195ms
This is the Console window
[2012-10-24 15:02:53 - SMSApp] ------------------------------
[2012-10-24 15:02:53 - SMSApp] Android Launch!
[2012-10-24 15:02:53 - SMSApp] adb is running normally.
[2012-10-24 15:02:53 - SMSApp] No Launcher activity found!
[2012-10-24 15:02:53 - SMSApp] The launch will only sync the application package on the device!
[2012-10-24 15:02:53 - SMSApp] Performing sync
[2012-10-24 15:02:53 - SMSApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'NFC-Smartphone-1'
[2012-10-24 15:02:55 - SMSApp] Application already deployed. No need to reinstall.
[2012-10-24 15:02:55 - SMSApp] \SMSApp\bin\SMSApp.apk installed on device
[2012-10-24 15:02:55 - SMSApp] Done!
As you can see the application was already installed on the emulator, but the same issue is present when the application is installed for the first time.
Let me know whether it is useful to see also the code.
I tried with a slightly different version of the same app just to force Eclipse to reinstall the app in the emulator (added a space). This is the LogCat of the reinstallation:
10-25 12:43:14.628: D/AndroidRuntime(701): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-25 12:43:14.628: D/AndroidRuntime(701): CheckJNI is ON
10-25 12:43:14.687: D/dalvikvm(701): Trying to load lib libjavacore.so 0x0
10-25 12:43:14.707: D/dalvikvm(701): Added shared lib libjavacore.so 0x0
10-25 12:43:14.747: D/dalvikvm(701): Trying to load lib libnativehelper.so 0x0
10-25 12:43:14.747: D/dalvikvm(701): Added shared lib libnativehelper.so 0x0
10-25 12:43:15.647: D/AndroidRuntime(701): Calling main entry com.android.commands.pm.Pm
10-25 12:43:15.707: W/ActivityManager(148): No content provider found for permission revoke: file:///data/local/tmp/SMSApp.apk
10-25 12:43:15.737: W/ActivityManager(148): No content provider found for permission revoke: file:///data/local/tmp/SMSApp.apk
10-25 12:43:15.917: I/PackageManager(148): Removing non-system package:com.storassa.android.smsapp
10-25 12:43:15.917: I/ActivityManager(148): Force stopping package com.storassa.android.smsapp uid=10044
10-25 12:43:15.967: I/dalvikvm(148): Jit: resizing JitTable from 4096 to 8192
10-25 12:43:16.088: I/PackageManager(148): Package com.storassa.android.smsapp codePath changed from /data/app/com.storassa.android.smsapp-2.apk to /data/app/com.storassa.android.smsapp-1.apk; Retaining data and using new
10-25 12:43:16.098: I/PackageManager(148): Running dexopt on: com.storassa.android.smsapp
10-25 12:43:16.948: D/dalvikvm(715): DexOpt: load 124ms, verify+opt 526ms, 730780 bytes
10-25 12:43:16.977: I/ActivityManager(148): Force stopping package com.storassa.android.smsapp uid=10044
10-25 12:43:16.977: W/PackageManager(148): Code path for pkg : com.storassa.android.smsapp changing from /data/app/com.storassa.android.smsapp-2.apk to /data/app/com.storassa.android.smsapp-1.apk
10-25 12:43:16.977: W/PackageManager(148): Resource path for pkg : com.storassa.android.smsapp changing from /data/app/com.storassa.android.smsapp-2.apk to /data/app/com.storassa.android.smsapp-1.apk
10-25 12:43:17.067: D/PackageManager(148): New package installed in /data/app/com.storassa.android.smsapp-1.apk
10-25 12:43:17.337: D/dalvikvm(148): GC_CONCURRENT freed 664K, 8% free 11375K/12231K, paused 77ms+12ms, total 180ms
10-25 12:43:17.337: D/dalvikvm(148): WAIT_FOR_CONCURRENT_GC blocked 100ms
Another tips: no saved filters appears in LogCat.
I have searched on the site but i could not find the exact resolution of this very annoying problem. Every time , i create a new Android project , it fails at the first attempt to run it with the reddish message "Could not fin *apk!" but work well on the second attempt and so on. Can anyone here help to fix this issue , as i did not have this problem previously. I could run my program at the first attempt.
Here is what i get at the console but you will be able to see that it works properly at the second attempt...
hope to here from you guys soon and thanks in advance.
I have eclipse Eclipse Indingo service release 1
ADT r15 running on a windows 7 ultimate machine
Console output message :
[2011-12-09 15:25:11 - Layout] ------------------------------
[2011-12-09 15:25:11 - Layout] Android Launch!
[2011-12-09 15:25:11 - Layout] adb is running normally.
[2011-12-09 15:25:11 - Layout] Could not find Layout.apk!
[2011-12-09 15:25:43 - Layout] ------------------------------
[2011-12-09 15:25:43 - Layout] Android Launch!
[2011-12-09 15:25:43 - Layout] adb is running normally.
[2011-12-09 15:25:43 - Layout] Performing com.delanation.lay.main activity launch
[2011-12-09 15:25:43 - Layout] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GingerBread'
[2011-12-09 15:25:43 - Layout] Uploading Layout.apk onto device 'emulator-5554'
[2011-12-09 15:25:44 - Layout] Installing Layout.apk...
[2011-12-09 15:25:47 - Layout] Success!
[2011-12-09 15:25:48 - Layout] Starting activity com.delanation.lay.main on device emulator-5554
[2011-12-09 15:25:49 - Layout] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.delanation.lay/.main }
LogCat :
=============================================
*12-09 00:31:24.611: D/AndroidRuntime(6161): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-09 00:31:24.611: D/AndroidRuntime(6161): CheckJNI is ON
12-09 00:31:25.371: D/AndroidRuntime(6161): Calling main entry com.android.commands.pm.Pm
12-09 00:31:25.581: D/dalvikvm(380): GC_EXPLICIT freed 5K, 54% free 2539K/5511K, external 1625K/2137K, paused 74ms
12-09 00:31:25.581: W/ActivityManager(81): No content provider found for:
12-09 00:31:25.643: W/ActivityManager(81): No content provider found for:
12-09 00:31:25.661: D/PackageParser(81): Scanning package: /data/app/vmdl-1754418723.tmp
12-09 00:31:25.771: D/PackageManager(81): Scanning package com.delanation.lay
12-09 00:31:25.782: I/PackageManager(81): Unpacking native libraries for /data/app/com.delanation.lay-1.apk
12-09 00:31:25.870: D/installd(35): DexInv: --- BEGIN '/data/app/com.delanation.lay-1.apk' ---
12-09 00:31:26.021: D/dalvikvm(6170): DexOpt: load 32ms, verify+opt 15ms
12-09 00:31:26.051: D/installd(35): DexInv: --- END '/data/app/com.delanation.lay-1.apk' (success) ---
12-09 00:31:26.061: D/PackageManager(81): Activities: com.delanation.lay.main
12-09 00:31:26.081: I/ActivityManager(81): Force stopping package com.delanation.lay uid=10042
12-09 00:31:26.391: I/installd(35): move /data/dalvik-cache/data#app#com.delanation.lay-1.apk#classes.dex -> /data/dalvik-cache/data#app#com.delanation.lay-1.apk#classes.dex
12-09 00:31:26.391: D/PackageManager(81): New package installed in /data/app/com.delanation.lay-1.apk
12-09 00:31:27.311: W/RecognitionManagerService(81): no available voice recognition services found
12-09 00:31:27.781: D/dalvikvm(81): GC_EXPLICIT freed 820K, 55% free 4739K/10375K, external 3933K/4430K, paused 124ms
12-09 00:31:27.801: D/AndroidRuntime(6161): Shutting down VM
12-09 00:31:27.811: D/dalvikvm(6161): GC_CONCURRENT freed 101K, 72% free 295K/1024K, external 0K/0K, paused 1ms+1ms
12-09 00:31:27.831: D/jdwp(6161): Got wake-up signal, bailing out of select
12-09 00:31:27.831: D/dalvikvm(6161): Debugger has detached; object registry had 1 entries
12-09 00:31:27.861: I/dalvikvm(6161): JNI: AttachCurrentThread (from ???.???)
12-09 00:31:27.861: I/AndroidRuntime(6161): NOTE: attach of thread 'Binder Thread #3' failed
12-09 00:31:28.501: D/AndroidRuntime(6175): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
12-09 00:31:28.501: D/AndroidRuntime(6175): CheckJNI is ON
12-09 00:31:29.251: D/AndroidRuntime(6175): Calling main entry com.android.commands.am.Am
12-09 00:31:29.281: I/ActivityManager(81): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.delanation.lay/.main } from pid 6175
12-09 00:31:29.531: D/AndroidRuntime(6175): Shutting down VM
12-09 00:31:29.531: I/ActivityManager(81): Start proc com.delanation.lay for activity com.delanation.lay/.main: pid=6184 uid=10042 gids={}
12-09 00:31:29.551: D/dalvikvm(6175): GC_CONCURRENT freed 102K, 69% free 320K/1024K, external 0K/0K, paused 1ms+1ms
12-09 00:31:29.591: D/jdwp(6175): Got wake-up signal, bailing out of select
12-09 00:31:29.591: D/dalvikvm(6175): Debugger has detached; object registry had 1 entries
12-09 00:31:29.622: I/AndroidRuntime(6175): NOTE: attach of thread 'Binder Thread #3' failed
12-09 00:31:30.821: I/ActivityManager(81): Displayed com.delanation.lay/.main: +1s304ms
12-09 00:31:35.971: D/dalvikvm(380): GC_EXPLICIT freed 6K, 54% free 2537K/5511K, external 1625K/2137K, paused 59ms
12-09 00:31:36.911: I/ActivityManager(81): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher } from pid 81
12-09 00:31:37.161: I/ActivityManager(81): No longer want com.android.inputmethod.latin (pid 2695): hidden #16
12-09 00:31:42.611: D/dalvikvm(393): GC_EXPLICIT freed 3K, 55% free 2532K/5511K, external 1625K/2137K, paused 70ms
12-09 00:31:47.641: D/dalvikvm(290): GC_EXPLICIT freed 8K, 55% free 2591K/5703K, external 1625K/2137K, paused 76ms
12-09 00:33:38.631: D/SntpClient(81): request time failed: java.net.SocketException: Address family not supported by protocol
12-09 00:37:29.201: V/BackupManagerService(81): Backup requested but nothing pending
12-09 00:38:38.681: D/SntpClient(81): request time failed: java.net.SocketException: Address family not supported by protocol
12-09 00:43:38.681: D/SntpClient(81): request time failed: java.net.SocketException: Address family not supported by protocol*
In eclipse select 'Window' -> 'Preferences' then expand the 'Android' sub-tree and select 'Build'.
Under 'Build Settings' if you have "Skip packaging and dexing until export or launch..." enabled, try disabling it to see if that fixes the problem.
I'm using a honeycomb device to test my app and for whatever reason the app runs like it doesn't have any content layout set. It used to run fine and it all of a sudden started showing just black. Other apps run fine and even new test apps from eclipse run fine.
Logcat on run:
09-22 23:07:07.955: DEBUG/AndroidRuntime(16269): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-22 23:07:07.955: DEBUG/AndroidRuntime(16269): CheckJNI is ON
09-22 23:07:08.203: DEBUG/AndroidRuntime(16269): Calling main entry com.android.commands.pm.Pm
09-22 23:07:08.251: DEBUG/dalvikvm(1633): GC_EXPLICIT freed 10K, 16% free 2666K/3139K, paused 1ms+1ms
09-22 23:07:08.251: WARN/ActivityManager(164): No content provider found for:
09-22 23:07:08.343: WARN/ActivityManager(164): No content provider found for:
09-22 23:07:08.347: DEBUG/PackageParser(164): Scanning package: /data/app/vmdl503116950.tmp
09-22 23:07:08.423: INFO/PackageManager(164): Removing non-system package:com.test.tv
09-22 23:07:08.423: INFO/Process(164): Sending signal. PID: 16153 SIG: 9
09-22 23:07:08.423: INFO/ActivityManager(164): Force stopping package com.test.tv uid=10026
09-22 23:07:08.471: DEBUG/dalvikvm(284): GC_EXPLICIT freed 13K, 24% free 3540K/4615K, paused 2ms+2ms
09-22 23:07:08.559: DEBUG/dalvikvm(611): GC_EXPLICIT freed <1K, 19% free 5940K/7303K, paused 20ms+7ms
09-22 23:07:08.583: DEBUG/dalvikvm(465): GC_EXPLICIT freed 4K, 60% free 5733K/14087K, paused 50ms+6ms
09-22 23:07:08.723: DEBUG/dalvikvm(164): GC_CONCURRENT freed 1557K, 55% free 9969K/21831K, paused 2ms+6ms
09-22 23:07:08.759: DEBUG/PackageManager(164): Scanning package com.test.tv
09-22 23:07:08.759: INFO/PackageManager(164): Package com.test.tv codePath changed from /data/app/com.test.tv-1.apk to /data/app/com.test.tv-2.apk; Retaining data and using new
09-22 23:07:08.759: INFO/PackageManager(164): Unpacking native libraries for /data/app/com.test.tv-2.apk
09-22 23:07:08.775: DEBUG/installd(116): DexInv: --- BEGIN '/data/app/com.test.tv-2.apk' ---
09-22 23:07:08.879: DEBUG/dalvikvm(16278): DexOpt: load 5ms, verify+opt 53ms
09-22 23:07:08.891: DEBUG/installd(116): DexInv: --- END '/data/app/com.test.tv-2.apk' (success) ---
09-22 23:07:08.891: DEBUG/PackageManager(164): Activities: com.test.tv.TestActivity com.test.tv.FullscreenActivity
09-22 23:07:08.891: INFO/ActivityManager(164): Force stopping package com.test.tv uid=10026
09-22 23:07:08.891: WARN/PackageManager(164): Code path for pkg : com.test.tv changing from /data/app/com.test.tv-1.apk to /data/app/com.test.tv-2.apk
09-22 23:07:08.891: WARN/PackageManager(164): Resource path for pkg : com.test.tv changing from /data/app/com.test.tv-1.apk to /data/app/com.test.tv-2.apk
09-22 23:07:08.951: INFO/installd(116): move /data/dalvik-cache/data#app#com.test.tv-2.apk#classes.dex -> /data/dalvik-cache/data#app#com.test.tv-2.apk#classes.dex
09-22 23:07:08.951: DEBUG/PackageManager(164): New package installed in /data/app/com.test.tv-2.apk
09-22 23:07:09.011: INFO/ActivityManager(164): Force stopping package com.test.tv uid=10026
09-22 23:07:09.075: DEBUG/dalvikvm(360): GC_EXPLICIT freed 72K, 16% free 2883K/3399K, paused 1ms+1ms
09-22 23:07:09.099: DEBUG/dalvikvm(236): GC_EXPLICIT freed 25K, 32% free 10096K/14727K, paused 2ms+3ms
09-22 23:07:09.111: DEBUG/PackageManager(164): generateServicesMap(android.accounts.AccountAuthenticator): 1 services unchanged
09-22 23:07:09.119: DEBUG/PackageManager(164): generateServicesMap(android.content.SyncAdapter): 1 services unchanged
09-22 23:07:09.131: DEBUG/PackageManager(164): generateServicesMap(android.accounts.AccountAuthenticator): 1 services unchanged
09-22 23:07:09.131: DEBUG/PackageManager(164): generateServicesMap(android.content.SyncAdapter): 1 services unchanged
09-22 23:07:09.143: DEBUG/GTalkService(284): [GTalkService.1] handlePackageInstalled: re-initialize providers
09-22 23:07:09.143: DEBUG/GTalkService(284): [RawStanzaProvidersMgr] ##### searchProvidersFromIntent
09-22 23:07:09.147: DEBUG/GTalkService(284): [RawStanzaProvidersMgr] no intent receivers found
09-22 23:07:09.159: WARN/RecognitionManagerService(164): no available voice recognition services found
09-22 23:07:09.271: DEBUG/dalvikvm(164): GC_EXPLICIT freed 681K, 56% free 9810K/21831K, paused 2ms+5ms
09-22 23:07:09.275: INFO/installd(116): unlink /data/dalvik-cache/data#app#com.test.tv-1.apk#classes.dex
09-22 23:07:09.279: DEBUG/AndroidRuntime(16269): Shutting down VM
09-22 23:07:09.295: INFO/AndroidRuntime(16269): NOTE: attach of thread 'Binder Thread #3' failed
09-22 23:07:09.295: DEBUG/dalvikvm(16269): GC_CONCURRENT freed 98K, 87% free 338K/2560K, paused 1ms+1ms
09-22 23:07:09.295: DEBUG/jdwp(16269): Got wake-up signal, bailing out of select
09-22 23:07:09.295: DEBUG/dalvikvm(16269): Debugger has detached; object registry had 1 entries
09-22 23:07:09.531: DEBUG/AndroidRuntime(16285): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
09-22 23:07:09.531: DEBUG/AndroidRuntime(16285): CheckJNI is ON
09-22 23:07:09.699: DEBUG/AndroidRuntime(16285): Calling main entry com.android.commands.am.Am
09-22 23:07:09.711: INFO/ActivityManager(164): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.test.tv/.TestActivity } from pid 16285
09-22 23:07:09.727: INFO/ActivityManager(164): Start proc com.test.tv for activity com.test.tv/.TestActivity: pid=16292 uid=10026 gids={3003}
09-22 23:07:09.735: DEBUG/AndroidRuntime(16285): Shutting down VM
09-22 23:07:09.743: INFO/AndroidRuntime(16285): NOTE: attach of thread 'Binder Thread #3' failed
09-22 23:07:09.751: DEBUG/dalvikvm(16285): GC_CONCURRENT freed 99K, 86% free 365K/2560K, paused 0ms+1ms
09-22 23:07:09.751: DEBUG/jdwp(16285): Got wake-up signal, bailing out of select
09-22 23:07:09.751: DEBUG/dalvikvm(16285): Debugger has detached; object registry had 1 entries
09-22 23:07:09.787: ERROR/jdwp(16292): Failed sending reply to debugger: Broken pipe
09-22 23:07:09.787: DEBUG/dalvikvm(16292): Debugger has detached; object registry had 1 entries
09-22 23:07:10.151: INFO/ActivityManager(164): Displayed com.test.tv/.TestActivity: +425ms
09-22 23:07:10.271: DEBUG/dalvikvm(236): GC_EXPLICIT freed 264K, 31% free 10199K/14727K, paused 3ms+4ms
Manifest:
<application android:icon="#drawable/logo" android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen" android:label="#string/app_name">
<activity android:name=".TestActivity"
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="FullscreenActivity">
<intent-filter>
<action android:name="com.test.tv" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
** edit FOUND PROBLEM **
The problem was in the onCreate for the Default Activity (in my case - TestActivity). Eclipse had added too many parameters to the onCreate function and that apparently stopped the function from running, but there was no error in the logs at all. Once those extra params were removed, everything went back to normal.
The problem was in the onCreate for the Default Activity (in my case - TestActivity). Eclipse had added too many parameters to the onCreate function and that apparently stopped the function from running, but there was no error in the logs at all. Once those extra params were removed, everything went back to normal.
The spinning globe application unning on the emulator works on android 1.5 as target but puts out a "force close application" error in android 2.2 target. Where should i look to find the problem ?
I have enclosed the logcat details that I get,
D/MediaScanner( 183): prescan time: 4913ms
D/MediaScanner( 183): scan time: 693ms
D/MediaScanner( 183): postscan time: 45ms
D/MediaScanner( 183): total time: 5651ms
D/MediaScannerService( 183): done scanning volume internal
I/PackageManager( 67): Removing non-system package:com.android.SpinningGlobe
I/ActivityManager( 67): Force stopping package com.android.SpinningGlobe uid=10038
D/dalvikvm( 127): GC_EXPLICIT freed 12963 objects / 655936 bytes in 168ms
D/PackageManager( 67): Scanning package com.android.SpinningGlobe
I/PackageManager( 67): Package com.android.SpinningGlobe codePath changed from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk; Retaining data and using new
I/PackageManager( 67): /data/app/com.android.SpinningGlobe-1.apk changed; unpacking
D/installd( 34): DexInv: --- BEGIN '/data/app/com.android.SpinningGlobe-1.apk' ---
D/dalvikvm( 255): DexOpt: load 214ms, verify 229ms, opt 5ms
D/installd( 34): DexInv: --- END '/data/app/com.android.SpinningGlobe-1.apk' success)---
W/PackageManager( 67): Code path for pkg : com.android.SpinningGlobe changing from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk
W/PackageManager( 67): Resource path for pkg : com.android.SpinningGlobe changing from /data/app/com.android.SpinningGlobe-2.apk to /data/app/com.android.SpinningGlobe-1.apk
I/ActivityManager( 67): Force stopping package com.android.SpinningGlobe uid=10038
D/PackageManager( 67): Activities: com.android.SpinningGlobe.GLApp
I/installd( 34): move /data/dalvik-cache/data#app#com.android.SpinningGlobe-1.apk#classes.dex -> /data/dalvik-cache/data#app#com.android.SpinningGlobe-1.apk#classes.dex
D/PackageManager( 67): New package installed in /data/app/com.android.SpinningGlobe-1.apk
I/ActivityManager( 67): Force stopping package com.android.SpinningGlobe uid=10038
I/ActivityManager( 67): Start proc com.svox.pico for broadcast com.svox.pico/.VoiceDataInstallerReceiver: pid=256 uid=10028 gids={}
D/dalvikvm( 167): GC_EXPLICIT freed 3943 objects / 244424 bytes in 1708ms
D/dalvikvm( 67): GC_EXPLICIT freed 7297 objects / 468432 bytes in 667ms
W/RecognitionManagerService( 67): no available voice recognition services found
I/ActivityThread( 256): Publishing provider com.svox.pico.providers.SettingsProvider: com.svox.pico.providers.SettingsProvider
I/installd( 34): unlink /data/dalvik-cache/data#app#com.android.SpinningGlobe-2.apk#classes.dex
D/AndroidRuntime( 118): Shutting down VM
D/jdwp ( 118): adbd disconnected
I/AndroidRuntime( 118): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 266):
D/AndroidRuntime( 266): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
D/AndroidRuntime( 266): CheckJNI is ON
D/AndroidRuntime( 266): --- registering native functions ---
I/ActivityManager( 67): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.android.SpinningGlobe/.GLApp }
D/AndroidRuntime( 266): Shutting down VM
D/jdwp ( 266): adbd disconnected
I/AndroidRuntime( 266): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 67): Start proc com.android.SpinningGlobe for activity com.android.SpinningGlobe/.GLApp: pid=273 uid=10038 gids={1015}
I/ARMAssembler( 67): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x32b4a0:0x32b5ac] in 3627836 ns
D/libEGL ( 273): egl.cfg not found, using default config
D/libEGL ( 273): loaded /system/lib/egl/libGLES_android.so
D/dalvikvm( 273): GC_EXTERNAL_ALLOC freed 839 objects / 59328 bytes in 151ms
W/dalvikvm( 273): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
I/ActivityManager( 67): Displayed activity com.android.SpinningGlobe/.GLApp: 4870 ms (total 4870 ms)
E/AndroidRuntime( 273): FATAL EXCEPTION: GLThread 8
E/AndroidRuntime( 273): java.lang.IndexOutOfBoundsException
E/AndroidRuntime( 273): at java.nio.IntArrayBuffer.get(IntArrayBuffer.java:63)
E/AndroidRuntime( 273): at com.android.SpinningGlobe.GLRenderer.onDrawFrame(GLRenderer.java:105)
E/AndroidRuntime( 273): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
E/AndroidRuntime( 273): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
W/ActivityManager( 67): Force finishing activity com.android.SpinningGlobe/.GLApp
I/ARMAssembler( 67): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x33f9a8:0x33fa64] in 1258819 ns
Any insights on where the problem could be ?
You should look at the log from the emulator.
You can get this on the command line using:
adb logcat
Or if you're using the ADT Plugin for Eclipse the log is visible there. If you can't see it select Window ▶ Show View ▶ Other... and then select Android ▶ LogCat.
It's probably also worth reading the Debugging page in the Android Developer Documentation.
Recompile it under 2.2 and look for deprecated warnings