solution for errors appear on LogCat in Android - android

I added google API with some markers on it to my android application. when I run the application it runs perfectly as usual. i.e. it runs like before adding the map. but it opens the LogCat with some errors. I search to solve the errors but I didn't reach a solution.
Note: these errors sometimes appear (Not Always).
here are the errors that appear on the LogCat
03-08 11:51:40.247: I/Icing(950): Storage manager: low false usage 9.34KB avail 99.15MB capacity 167.55MB
03-08 11:51:40.437: E/Icing(950): Error initializing, resetting corpora: Could not create native index
03-08 11:51:40.567: E/Icing(950): Internal init failed
03-08 11:51:40.567: E/Icing(950): Couldn't handle android.intent.action.PACKAGE_REMOVED intent due to initialization failure.
03-08 11:51:41.147: D/PackageBroadcastService(950): Received broadcast action=android.intent.action.PACKAGE_ADDED and uri=com.project.sbms
03-08 11:51:41.387: E/Icing(950): Couldn't handle android.intent.action.PACKAGE_ADDED intent due to initialization failure.
03-08 11:51:41.747: D/dalvikvm(950): GC_FOR_ALLOC freed 282K, 25% free 3135K/4164K, paused 37ms, total 40ms
03-08 11:51:41.787: I/PeopleContactsSync(950): CP2 sync disabled
03-08 11:51:42.937: D/PackageBroadcastService(950): Received broadcast action=android.intent.action.PACKAGE_REPLACED and uri=com.project.sbms
03-08 11:51:43.017: I/PeopleContactsSync(950): CP2 sync disabled
03-08 11:51:43.027: E/Icing(950): Couldn't handle android.intent.action.PACKAGE_REPLACED intent due to initialization failure.
Could anyone please help me find a solution..
Thanks..

Related

Firebase Crashes doesn't show in Firebase Console at all

The app I am developing is linked to a project in Firebase Console. I have included 'google-services.json' under the 'app' folder too.
My Top Level build.gradle is:
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.google.gms:google-services:3.0.0'
}
My App Level build.gradle is:
dependencies {
compile 'com.google.firebase:firebase-crash:9.8.0'
}
apply plugin: 'com.google.gms.google-services'
I know that latest 'firebase-crash' is 10.0.1 which requires an updated Google Repository and Google Play Services. However, I am able to use same firebase-crash on another app I am making. I am a little short on internet pack, i can't update yet.
I use following snippet in onCreate() of MainActivity to cause a test crash:
FirebaseCrash.log(TAG + ": Test Log"));
FirebaseCrash.report(new Exception("Test Exception"));
I checked 'google-services.json' too for correct mobile_sdk_id, it matches perfectly. My package name matches with firebase project too.
I don't do anything with Firebase Analytics.
Following is logcat output:
20:09:07.830 D/OpenGLRenderer: Enabling debug mode 0
20:09:07.915 D/FA: Connected to remote service
20:09:07.915 V/FA: Processing queued up service tasks: 3
20:09:10.340 D/dalvikvm: GC_CONCURRENT freed 301K, 12% free 11312K/12807K, paused 45ms+3ms, total 167ms
20:09:12.995 V/FA: Inactivity, disconnecting from the service
20:13:29.480 V/FA: Recording user engagement, ms: 261701
20:13:29.480 V/FA: Using measurement service
20:13:29.480 V/FA: Connecting to remote service
20:13:29.485 V/FA: Activity paused, time: 31073604
20:13:29.485 D/FA: Logging event (FE): _e, Bundle[{_o=auto, _si=-207754800234984953, _et=261701, _sc=MainActivity}]
20:13:29.675 D/dalvikvm: GC_CONCURRENT freed 612K, 14% free 11339K/13127K, paused 31ms+64ms, total 187ms
20:13:29.675 V/FA: Using measurement service
20:13:29.690 V/FA: Connection attempt already in progress
20:13:29.690 D/FA: Connected to remote service
20:13:29.695 V/FA: Processing queued up service tasks: 2
20:13:34.745 V/FA: Inactivity, disconnecting from the service
20:26:19.835 D/dalvikvm: GC_CONCURRENT freed 630K, 14% free 11302K/13127K, paused 19ms+2ms, total 135ms
Its been 5 hours since i am trying to see Errors on Firebase Console. I have tried opening and closing my app for more than 20 times.
How do i know FirebaseCrash has been enabled?
When will Errors show up in console?
Am i doing something wrong?
Edit:
There is no V/FirebaseCrash: message in logcat.
Following does not appear in logcat:
FirebaseCrash.logcat(0, TAG, "Test Logcat 0");
FirebaseCrash.logcat(1, TAG, "Test Logcat 1");
There are some lines printed by FirebaseCrash before debugger has attached:
12-11 22:27:09.950 I/FirebaseCrash: FirebaseCrash reporting initialized com.google.android.gms.internal.zzbks#424d3e68
12-11 22:27:09.950 I/FirebaseInitProvider: FirebaseApp initialization successful
Updated Firebase-Crash to 10.0.1 and other SDK tools. No change.
I am so ashamed to know that my laptop's date was one day late. As soon as i corrected the date, results started to show in console. My problem is solved now.

NullPointer exception when resuming app on android

I am currently testing an app. This is the test case. Load the app and then go to google leader board. Then press home button and do some other tasks. Then come back to the app again by clicking on the app icon. When I do this I still see the previously loaded leaderboard. Afterwards if I click back button on the leaderboard to resume the app following exception occurs.
I have also listed the logcat output. I can't debug this to see whats null because dubug has been detached before this event. What can I do to solve this?
ava.lang.RuntimeException: Unable to start activity ComponentInfo{XXX: java.lang.NullPointerException
11-03 16:30:04.877: E/AndroidRuntime(619): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
u=0} from pid 13361
11-09 22:51:02.015 3677-3677/? D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.games from APK com.google.android.play.games
11-09 22:51:02.019 3677-3677/? D/ChimeraModuleLdr﹕ Module APK com.google.android.play.games already loaded
11-09 22:51:02.105 3677-13641/? V/BaseAuthAsyncOperation﹕ All scopes had been granted in the past, skip access token fetching
11-09 22:51:02.160 3677-13641/? V/BaseAuthAsyncOperation﹕ access token request successful
11-09 22:51:02.187 249-283/? I/ActivityManager﹕ Displayed invalid entry.
11-09 22:51:09.750 249-943/? I/WindowState﹕ WIN DEATH: Window{41fda2b8 com.champ/com.champ.controllers.MainActivity paused=false}
11-09 22:51:09.750 249-494/? I/ActivityManager﹕ Process com.champ (pid 13361) has died.
11-09 22:51:13.836 3677-3677/? D/ChimeraCfgMgr﹕ Loading module com.google.android.gms.games from APK com.google.android.play.games
11-09 22:51:13.836 3677-3677/? D/ChimeraModuleLdr﹕ Module APK com.google.android.play.games already loaded
11-09 22:51:14.773 456-456/? D/dalvikvm﹕ WAIT_FOR_CONCURRENT_GC blocked 0ms
11-09 22:51:21.773 249-943/? D/dalvikvm﹕ GC_FOR_ALLOC freed 1448K, 17% free 19437K/23303K, paused 82ms, total 91ms
11-09 22:51:21.804 13789-13789/? D/dalvikvm﹕ Late-enabling CheckJNI
11-09 22:51:21.816 249-953/? I/ActivityManager﹕ Start proc com.champ for activity com.champ/.controllers.MainActivity: pid=13789 uid=10063 gids={1015, 1028, 3003}
11-09 22:51:25.586 249-835/? I/ActivityManager﹕ Process com.champ (pid 13789) has died.
11-09 22:51:25.590 249-835/? W/ActivityManager﹕ Force removing ActivityRecord{415b2150 com.champ/.controllers.ErrorActivity}: app died, no saved state
11-09 22:51:25.617 13857-13857/? D/dalvikvm﹕ Late-enabling CheckJNI
11-09 22:51:25.621 249-835/? I/ActivityManager﹕ Start proc com.champ for activity com.champ/.controllers.MainActivity: pid=13857 uid=10063 gids={1015, 1028, 3003}
11-09 22:51:25.687 249-953/? W/InputMethodManagerService﹕ Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41db2610 attribute=null
Use try catch to get more info.
Did You save some Data in Application or Static Utils?
Because the page before You leader board is kill by System. When you back from Leader board,System rebuild it.
But some data become null.
In this case , you may use some data is null.
Simplely:
Add a check before you get data from Util.
public getA(){
if(a = null){a = b;}
return a;
}

How to fix the error Unfortunately, the process "android.process.acore has stopped"?

we are porting whole android open source for the device Imx-6X-solo board.Developing and re-skinning all the applications.Every thing is done properly and device is ready now. But the problem is I am getting " Unfortunately, the process "android.process.acore has stopped" " error during uninstallation of the application. That is when I go to
Settings --> apps --> any third party app installed --> Uninstall .
Then I am getting this error.But app is successfully uninstalling. Can anyone please help me.. Thanks in adavance.
The logs while uninstalling are as follows..
I/ContentGridAdapter( 2576): ------- book pkg name for uninstalling is ------
com.vienom.kb.nini
D/FableSyncService( 2366): Tell package managere to uninstall: com.vienom.kb.nini
I/FableSyncManager( 2366): start processContentUninstallRequest
D/log ( 2366): ENTERED unInstallFableContent com.vienom.kb.nini
D/Log ( 2366): PACKAGE IS INSTALLED
D/log ( 2366): START FABLE UNINSTALL APP
I/FableSyncManager( 2366): exit processContentUninstallRequest
D/FableSyncService( 2366): package manager uninstalling..: com.vienom.kb.nini
W/audio_hw_primary( 1932): start_output_stream...
W/audio_hw_primary( 1932): headphone 0 ,headset 0 ,speaker 2, earpiece 0,
W/audio_hw_primary( 1932): card 0, port 0 device 2
I/PackageManager( 2059): Removing non-system package:com.vienom.kb.nini
I/ActivityManager( 2059): Force stopping package com.vienom.kb.nini uid=10034
D/dalvikvm( 2059): GC_CONCURRENT freed 360K, 11% free 7818K/8775K, paused 5ms+3ms
I/ActivityManager( 2059): Force stopping package com.vienom.kb.nini uid=10034
D/dalvikvm( 2576): GC_EXPLICIT freed 316K, 15% free 7755K/9031K, paused 2ms+2ms
D/PackageManager( 2059): generateServicesMap(android.accounts.AccountAuthenticator): 2 services unchanged
D/PackageManager( 2059): generateServicesMap(android.content.SyncAdapter): 1 services unchanged
W/ResourceType( 2059): Failure getting entry for 0x7f060000 (t=5 e=0) in package 0 (error -75)
D/BackupManagerService( 2059): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.vienom.kb.nini flg=0x10000010 (has extras) }
V/BackupManagerService( 2059): removePackageParticipantsLocked: #1
D/dalvikvm( 2289): GC_EXPLICIT freed 358K, 8% free 5955K/6471K, paused 2ms+10ms
W/PluginManager( 2472): Can't find plugin: com.vienom.kb.nini
E/ActivityThread( 2223): Failed to find provider info for com.android.inputmethod.latin.dictionarypack
E/BinaryDictionaryGetter( 2223): Could not find a dictionary pack
W/Searchables( 2059): No global search activity found
D/VoicemailCleanupService( 2289): Cleaning up data for package: com.vienom.kb.nini
W/dalvikvm( 2289): threadid=15: thread exiting with uncaught exception (group=0x40a2b1f8)
E/AndroidRuntime( 2289): FATAL EXCEPTION: IntentService[VoicemailCleanupService]
E/AndroidRuntime( 2289): java.lang.SecurityException: The caller must have permission: com.android.voicemail.permission.ADD_VOICEMAIL
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailPermissions.checkCallerHasOwnVoicemailAccess(VoicemailPermissions.java:52)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailContentProvider.checkPermissionsAndCreateUriData(VoicemailContentProvider.java:301)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailContentProvider.delete(VoicemailContentProvider.java:129)
E/AndroidRuntime( 2289): at android.content.ContentProvider$Transport.delete(ContentProvider.java:213)
E/AndroidRuntime( 2289): at android.content.ContentResolver.delete(ContentResolver.java:822)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailCleanupService.handleIntentInternal(VoicemailCleanupService.java:51)
E/AndroidRuntime( 2289): at com.android.providers.contacts.VoicemailCleanupService.onHandleIntent(VoicemailCleanupService.java:40)
E/AndroidRuntime( 2289): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/AndroidRuntime( 2289): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 2289): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2289): at android.os.HandlerThread.run(HandlerThread.java:60)
I/ActivityManager( 2059): Start proc com.android.keychain for broadcast com.android.keychain/.KeyChainBroadcastReceiver: pid=2613 uid=1000 gids={1015, 3003, 2001, 3002, 3001}
D/dalvikvm( 2059): GC_CONCURRENT freed 635K, 13% free 7722K/8775K, paused 3ms+5ms
D/dalvikvm( 2059): GC_EXPLICIT freed 105K, 13% free 7698K/8775K, paused 5ms+5ms
D/log ( 2366): ENTERED PACKAGE UNINSTALLED OBSERVER
D/Log ( 2366): DELETE SUCCEEDEDcom.vienom.kb.nini
I/ActivityManager( 2059): Start proc com.android.defcontainer for service com.android.defcontainer/.DefaultContainerService: pid=2627 uid=10005 gids={1015, 2001}
I/FableDatabase( 2366): deleteContentName: 9001Status 0
I/FableDatabase( 2366):
I/FableDatabase( 2366): Thumbnail not found for :com.vienom.kb.nini
I/FableDatabase( 2366): Deleted from device: /mnt/sdcard/fable/books/22_fable_full.apk
D/MediaProvider( 2211): object removed 50
I got the solution. By mistake I removed the Contacts app. Every time, Contacts Storage app is checking for contacts.So Now again I installed Contacts.apk. And it works fine after installing.
one more solution is
Settings --> apps --> All --> Contacts Storage --> clear data and Force stop
Backup your contacts. Go to settings and clear the "Data" of Contact Storage. This will remove all your contacts. After that, restore your contacts back and the error will go. This basically happens when FB messes up with your contacts.
it is not directly contacts related. 10 minutes ago this message start to popup every 1 second (!). It started to popup after i removed my account from DROPBOX. I tried rebooting several times but nothing helped.
Finally i decided to re-link the account i removed from DROPBOX and then the popup message stopped !
The problem appears because there is a broken link. To some it appears with contacts. To me it happend with DROPBOX. I assume to others it can happend with a different app.
It is an Android failure, not an app faluire.
(I use Galaxy S4 with Kitkat 4.4.2)
Good Luck,
Yuval
My repair has not been posted as of yet - here is another.
Settings->applications manager->bottom left menu button / Choose reset app preferences / Choose Reset Apps.
This worked for me ,,, Must have shut something off that android/Samsung didn't like
cheers

Android Toast cannot be resolved as field or type

I've done some research on the above error and it would seem that to solve there are two ways most people do:
Re import R
Close and restart eclipse
However I have done both and yet I still get the same error. Does anyone know of any other ways to defeat this error?
I'm thinking though that it may be my code. I'm trying to compile the bluetooth le sample found here
I've brought over everything yet I'm still stuck with 36 errors with most of them being this cannot be resolved as field or type error.
Here is how they call the toast line:
Toast.makeText(this, R.string.error_bluetooth_not_supported, Toast.LENGTH_SHORT).show();
And there strings.xml found in the values folder:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">BLE Sample</string>
<string name="ble_not_supported">BLE is not supported</string>
<string name="label_data">Data:</string>
<string name="label_device_address">Device address:</string>
<string name="label_state">State:</string>
<string name="no_data">No data</string>
<string name="connected">Connected</string>
<string name="disconnected">Disconnected</string>
<string name="title_devices">BLE Device Scan</string>
<string name="error_bluetooth_not_supported">Bluetooth not supported.</string>
<string name="unknown_device">Unknown device</string>
<string name="unknown_characteristic">Unknown characteristic</string>
<string name="unknown_service">Unknown service</string>
<!-- Menu items -->
<string name="menu_connect">Connect</string>
<string name="menu_disconnect">Disconnect</string>
<string name="menu_scan">Scan</string>
<string name="menu_stop">Stop</string>
</resources>
I'm literally a day into my first android development and this is all new to me. I thought using the sample code they would provide would help me get a good over view of how the bluetooth system works.
Can anyone help me beat this error?
I should add that every item on this list has an error. Any time I call anything with R.string. it get the same error.
Logcat since 1:25pm:
09-06 13:25:20.901: E/(526): W/virtual loc_api_adapter_err LocApiAdapter::enableData(int): default implementation invoked
09-06 13:25:20.901: E/(526): W/virtual loc_api_adapter_err LocApiAdapter::setAPN(char*, int): default implementation invoked
09-06 13:25:20.911: D/PicasaUploaderSyncManager(25851): active network: NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: "SOL2", roaming: false, failover: false, isAvailable: true
09-06 13:25:20.921: D/GCM(2565): GcmService start Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x8000010 cmp=com.google.android.gms/.gcm.GcmService (has extras) } android.net.conn.CONNECTIVITY_CHANGE
09-06 13:25:21.051: D/ConnectivityService(526): handleInetConditionHoldEnd: net=1, condition=100, published condition=0
09-06 13:25:21.542: D/Tethering(526): MasterInitialState.processMessage what=3
09-06 13:25:21.642: E/(526): W/virtual loc_api_adapter_err LocApiAdapter::enableData(int): default implementation invoked
09-06 13:25:21.642: E/(526): W/virtual loc_api_adapter_err LocApiAdapter::setAPN(char*, int): default implementation invoked
09-06 13:25:21.662: D/GCM(2565): GcmService start Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x8000010 cmp=com.google.android.gms/.gcm.GcmService (has extras) } android.net.conn.CONNECTIVITY_CHANGE
09-06 13:25:22.102: D/ConnectivityService(526): handleInetConditionHoldEnd: net=1, condition=100, published condition=100
09-06 13:30:01.245: V/DigitalWidgetViewsFactory(6453): DigitalWidget sets next alarm string to null
09-06 13:36:19.083: I/ActivityManager(526): No longer want com.google.android.talk (pid 26303): empty for 1801s
09-06 13:36:31.455: V/BackupManagerService(526): Running a backup pass
09-06 13:36:31.455: V/BackupManagerService(526): clearing pending backups
09-06 13:36:31.455: V/PerformBackupTask(526): Beginning backup of 1 targets
09-06 13:36:31.485: V/BackupServiceBinder(526): doBackup() invoked
09-06 13:36:31.485: D/PerformBackupTask(526): invokeAgentForBackup on #pm#
09-06 13:36:31.495: I/PerformBackupTask(526): no backup data written; not calling transport
09-06 13:36:31.506: D/PerformBackupTask(526): starting agent for backup of BackupRequest{pkg=com.android.providers.settings}
09-06 13:36:31.506: D/BackupManagerService(526): awaiting agent for ApplicationInfo{4202bfe0 com.android.providers.settings}
09-06 13:36:31.506: D/BackupManagerService(526): agentConnected pkg=com.android.providers.settings agent=android.app.backup.BackupAgent$BackupServiceBinder#42081138
09-06 13:36:31.506: I/BackupManagerService(526): got agent android.app.backup.BackupAgent$BackupServiceBinder#42081138
09-06 13:36:31.506: D/PerformBackupTask(526): invokeAgentForBackup on com.android.providers.settings
09-06 13:36:31.516: V/BackupServiceBinder(526): doBackup() invoked
09-06 13:36:31.526: W/SettingsBackupAgent(526): Couldn't backup /data/misc/wifi/ipconfig.txt
09-06 13:36:31.526: I/PerformBackupTask(526): no backup data written; not calling transport
09-06 13:36:31.526: I/PerformBackupTask(526): Backup pass finished.
09-06 13:39:59.999: I/ActivityManager(526): No longer want com.google.android.music:main (pid 26385): empty for 1849s
09-06 13:40:00.099: W/ActivityManager(526): Scheduling restart of crashed service com.google.android.music/.playback.MusicPlaybackService in 5000ms
09-06 13:40:05.134: I/ActivityManager(526): Start proc com.google.android.music:main for service com.google.android.music/.playback.MusicPlaybackService: pid=27303 uid=10041 gids={50041, 3003, 1015, 1028}
09-06 13:40:05.214: I/MusicStore(27303): Database version: 70
09-06 13:40:05.274: D/dalvikvm(27303): GC_CONCURRENT freed 315K, 4% free 9097K/9448K, paused 3ms+9ms, total 39ms
09-06 13:40:05.274: D/dalvikvm(27303): WAIT_FOR_CONCURRENT_GC blocked 2ms
09-06 13:40:05.284: D/dalvikvm(27303): WAIT_FOR_CONCURRENT_GC blocked 5ms
09-06 13:40:05.364: D/SystemUtils(27303): getSystemProperty: lpa.decode=null
09-06 13:40:05.364: D/CacheService(27303): onCreate
09-06 13:40:05.374: D/CacheService(27303): onBind
09-06 13:40:05.384: I/LocalDevicePlayback(27303): Streaming client created.
09-06 13:40:06.445: D/dalvikvm(27303): GC_CONCURRENT freed 181K, 3% free 9337K/9580K, paused 4ms+4ms, total 30ms
09-06 13:40:06.535: I/MediaStoreImporter(27303): Update: incremental Added music: 0 Updated music: 0 Deleted music: 0 Created playlists: 0 Updated playlists: 0 Deleted playlists: 0 Inserted playlist items: 0 Deleted playlist items: 0 Removed orphaned playlist items: 0
09-06 13:40:10.459: I/MusicLeanback(27303): Conditions not met for autocaching.
09-06 13:40:10.459: I/MusicLeanback(27303): Stop autocaching.
09-06 13:40:20.549: D/GCM(2565): Ignoring attempt to send heartbeat on dead connection.
09-06 13:40:59.997: I/ActivityManager(526): No longer want android.process.acore (pid 26550): empty for 1807s
09-06 13:45:01.283: V/DigitalWidgetViewsFactory(6453): DigitalWidget sets next alarm string to null
09-06 13:48:16.403: I/EventLogService(2565): Aggregate from 1378470317827 (log), 1378469896229 (data)
09-06 13:48:16.533: I/ServiceDumpSys(2565): dumping service [account]
09-06 13:50:23.497: I/jdwp(24586): Ignoring second debugger -- accepting and dropping
09-06 13:50:23.507: I/jdwp(20948): Ignoring second debugger -- accepting and dropping
09-06 13:50:34.378: D/dalvikvm(526): GC_CONCURRENT freed 3407K, 27% free 23292K/31488K, paused 11ms+8ms, total 146ms
09-06 13:52:43.224: D/ChildProcessLauncher(5790): Setting up connection to process: slot=2
09-06 13:52:43.224: I/ActivityManager(526): Start proc com.android.chrome:sandboxed_process2 for service com.android.chrome/org.chromium.content.app.SandboxedProcessService2: pid=27469 uid=99002 gids={}
09-06 13:52:43.244: I/ChildProcessService(27469): Creating new ChildProcessService pid=27469
09-06 13:52:43.254: D/ChildProcessLauncher(5790): on connect callback, pid=27469 context=2105709408
09-06 13:52:43.254: I/LibraryLoader(27469): loading: chromeview
09-06 13:52:43.304: I/LibraryLoader(27469): loaded: chromeview
09-06 13:52:43.304: I/chromium(27469): [INFO:library_loader_hooks.cc(72)] Chromium logging enabled: level = 0, default verbosity = 0
09-06 13:52:43.314: D/TraceEvent(27469): View tag enabled: false
09-06 13:52:43.334: I/chromium(27469): [INFO:child_process_service.cc(132)] ChildProcessService: Exiting child process.
09-06 13:52:43.344: W/ChildProcessConnection(5790): onServiceDisconnected (crash?): pid=27469
09-06 13:52:43.344: D/ChildProcessLauncher(5790): stopping child connection: pid=27469
09-06 13:52:43.344: I/ActivityManager(526): Process com.android.chrome:sandboxed_process2 (pid 27469) has died.
09-06 13:52:43.344: W/ActivityManager(526): Scheduling restart of crashed service com.android.chrome/org.chromium.content.app.SandboxedProcessService2 in 5000ms
Try to show Toast like this:
Toast.makeText(context, context.getString(R.string.error_bluetooth_not_supported),Toast.LENGTH_LONG).show();
Here context refers to context of current Activity where you showing the Toast.
See these as well: Toast.makeText from resource string
Android: Java: using a string resource in a Toast
1) Typically, all R.string.stuff cease to be errors after you build the project because the file R.java is generated during the build. If you have not yet built the project, they are shown as errors and this is normal. By the way, in Eclipse, you can manually delete the error messages in the error message window (you can select and delete one or several errors, but cannot delete the root node that reads "Errors (N items)"). One more "magic" pass is pressing F5 ("Refresh") when the project is selected in the "Package Explorer" (the left-hand) pane.
2) Make sure that the generated R class belongs to the same package as the class where it's used. In Eclipse you must see in the "Package Explorer" pane: YourProject--gen--your.package--R.java.
(If that file does not exist, is the folder read/write?)
3) It may be easier to create an empty project and move the google sources to it than try to compile the project from git. At least some google app projects use a directory structure that is different from what you normally get with Eclipse (because they are built with a special script).
Generally when there are any errors in the resource folder , the R.Java file doesnt get created properly and as a result you will get this sort of error . Please check whether you have any errors in the layout folder or drawable folder.
Use:
Toast.makeText(this, getResources().getText(R.string.error_bluetooth_not_supported).toString(), Toast.LENGTH_SHORT).show();
U can use:
String str = getResources().getText(R.string.error_bluetooth_not_supported).toString();

Activity restarts on Force Close

I have an Application with a single root Activity. I've recently had it brought to my attention that any kind of Force Close on my Activity results in it restarting and I have no idea why this might happen. If I force an uncaught exception or use the 'long back press to force close' option, they both result in the same.
My only guess would have been some form of quirk relating to retained references to some part of the Activity, only I don't have any outside of some WeakReference entries at the Application level.
Relevant logcat entries:
05-25 08:25:49.137: INFO/ActivityManager(18449): Displayed uk.co.randomicon.rstb/.TreeBuilderActivity: +8s82ms
05-25 08:25:54.222: DEBUG/dalvikvm(18546): GC_EXPLICIT freed 12K, 57% free 3640K/8327K, external 8323K/10136K, paused 72ms
05-25 08:25:55.373: WARN/InputManagerService(18449): Got RemoteException sending setActive(false) notification to pid 19122 uid 10069
05-25 08:25:59.217: DEBUG/dalvikvm(18646): GC_EXPLICIT freed 128K, 48% free 2980K/5703K, external 0K/0K, paused 67ms
05-25 08:26:00.238: DEBUG/dalvikvm(18991): GC_CONCURRENT freed 343K, 51% free 2794K/5639K, external 303K/532K, paused 3ms+3ms
05-25 08:26:02.950: INFO/Process(18449): Sending signal. PID: 19554 SIG: 9
05-25 08:26:02.980: INFO/ActivityManager(18449): Process uk.co.randomicon.rstb (pid 19554) has died.
05-25 08:26:02.990: ERROR/InputDispatcher(18449): channel '40a16ec8 uk.co.randomicon.rstb/uk.co.randomicon.rstb.TreeBuilderActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x8
05-25 08:26:02.990: ERROR/InputDispatcher(18449): channel '40a16ec8 uk.co.randomicon.rstb/uk.co.randomicon.rstb.TreeBuilderActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
05-25 08:26:02.990: INFO/WindowManager(18449): WINDOW DIED Window{40a16ec8 uk.co.randomicon.rstb/uk.co.randomicon.rstb.TreeBuilderActivity paused=false}
05-25 08:26:03.010: WARN/WindowManager(18449): Failed looking up window
05-25 08:26:03.010: WARN/WindowManager(18449): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy#40c774e0 does not exist
05-25 08:26:03.010: WARN/WindowManager(18449): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8177)
05-25 08:26:03.010: WARN/WindowManager(18449): at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8168)
05-25 08:26:03.010: WARN/WindowManager(18449): at com.android.server.WindowManagerService$WindowState$DeathRecipient.binderDied(WindowManagerService.java:7026)
05-25 08:26:03.010: WARN/WindowManager(18449): at android.os.BinderProxy.sendDeathNotice(Binder.java:385)
05-25 08:26:03.010: WARN/WindowManager(18449): at dalvik.system.NativeStart.run(Native Method)
05-25 08:26:03.010: INFO/WindowManager(18449): WIN DEATH: null
05-25 08:26:03.020: INFO/ActivityManager(18449): Start proc uk.co.randomicon.rstb for activity uk.co.randomicon.rstb/.TreeBuilderActivity: pid=19565 uid=10069 gids={1015}
Any ideas where to even begin poking would be gratefully received!
EDIT: This was caused by me setting android:stateNotNeeded="true" in my Manifest. While I don't need the state, this caused Android to decide it was best to relaunch my app on the assumption the user would want that.
Here is some useful info:
As far as when an activity is restarted -- if the process running the
foreground activity goes away, the system will throw away that activity if
it does not have a valid saved state for it (typically meaning it is paused
and has given the system the result of onSaveInstanceState from before the
pause). Once it has decided whether or not to throw away that activity, it
will resume whatever activity is now at the top of the stack. If this is
one of your activities -- either because you have another behind the one
that crashed, or the one that crashed was somehow it the settled pause state
-- then it will start your process again to show that top activity.
This may be caused by calling a system API that is not available on your target device. I ran into a similar issue then trying to call ActivityManager.MemoryInfo.totalMem on a 4.0.x device. I didn't get any compile errors as I was targeting 4.2.2 and ActivityManager.MemoryInfo.totalMem was added in API16 (4.1)
if app has android:persistent="true" in manifest, it will restart when killed.

Categories

Resources