开发者

My application launchs twice on Honeycomb

开发者 https://www.devze.com 2023-03-08 17:26 出处:网络
When I execute my application on Honeycomb it gets launched twice.. I have place a breakpoint in the launcher Activity, in the onCreate() method, and although there is only one running process, the d

When I execute my application on Honeycomb it gets launched twice.. I have place a breakpoint in the launcher Activity, in the onCreate() method, and although there is only one running process, the debugger stops twice on the breakpoint and there is two visible applications running on my tablet, one rear the other.

there is someone experiencing something like this in Honeycomb? any insight?

Here is the log, notice about the two calls to LoadingActivity.OnCreate().

 
05-25 15:59:08.900: INFO/System.out(28656): Sending WAIT chunk
05-25 15:59:08.900: WARN/ActivityThread(28656): Application net.XXXX.android is waiting for the debugger on port 8100...
05-25 15:59:09.080: INFO/dalvikvm(28656): Debugger is active
05-25 15:59:09.100: INFO/System.out(28656): Debugger has connected
05-25 15:59:09.100: INFO/System.out(28656): waiting for debugger to settle...
                                    ...
05-25 15:59:10.700: INFO/System.out(28656): waiting for debugger to settle...
05-25 15:59:10.900: INFO/System.out(28656): debugger has settled (1454)
05-25 15:59:11.570: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)

// ------------------------------------------------------------------------------------------------------
// First call to my launcher Activity
--->> 05-25 15:59:18.040: VERBOSE/SplashActivity(28656): LoadActivity.onCreate()
                                    ...
05-25 15:59:18.110: DEBUG/dalvikvm(28656): GC_FOR_ALLOC freed 100K, 4% free 6393K/6599K, paused 15ms                                    
05-25 15:59:18.180: DEBUG/szipinf(28656): Initializing inflate state
05-25 15:59:18.190: DEBUG/szipinf(28656): Initializing zlib to inflate
05-25 15:59:18.330: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:18.360: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:18.360: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 63K, 4% free 6770K/6983K, paused 1ms+1ms
05-25 15:59:18.940: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:18.960: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:18.960: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 278K, 6% free 6943K/7367K, paused 1ms+2ms
05-25 15:59:19.500: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:19.510: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:19.510: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 327K, 7% free 7021K/7495K, paused 2ms+2ms
05-25 15:59:20.090: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:20.130: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:20.130: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 350K, 7% free 7128K/7623K, paused开发者_开发知识库 1ms+2ms
05-25 15:59:20.640: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:20.680: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:20.680: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 339K, 7% free 7200K/7687K, paused 1ms+2ms
05-25 15:59:21.180: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:21.190: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:21.200: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 324K, 7% free 7281K/7751K, paused 2ms+2ms
05-25 15:59:21.810: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:21.850: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:21.850: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 341K, 7% free 7394K/7879K, paused 1ms+2ms
05-25 15:59:22.380: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:22.410: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:22.410: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 343K, 7% free 7456K/7943K, paused 1ms+2ms
05-25 15:59:22.880: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:22.900: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:22.900: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 325K, 6% free 7541K/8007K, paused 1ms+2ms
                                    ...
05-25 15:59:23.620: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
                                    ...
05-25 15:59:23.640: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 15:59:23.640: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 350K, 7% free 7628K/8135K, paused 1ms+2ms

// ------------------------------------------------------------------------------------------------------
// Second call to my launcher Activity
--->> 05-25 16:01:56.620: VERBOSE/SplashActivity(28656): LoadActivity.onCreate()
                                    ...
05-25 16:04:33.260: DEBUG/szipinf(28656): Initializing inflate state
05-25 16:04:33.260: DEBUG/szipinf(28656): Initializing zlib to inflate
05-25 16:04:33.750: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:33.780: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:33.780: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 382K, 7% free 7674K/8199K, paused 1ms+2ms
05-25 16:04:34.360: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:34.390: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:34.390: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 429K, 7% free 7691K/8263K, paused 2ms+2ms
05-25 16:04:34.960: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:34.970: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:34.980: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 434K, 7% free 7686K/8263K, paused 1ms+2ms
05-25 16:04:35.520: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:35.550: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:35.550: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 434K, 7% free 7687K/8263K, paused 1ms+2ms
05-25 16:04:36.100: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:36.120: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:36.120: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 433K, 7% free 7686K/8263K, paused 2ms+2ms
05-25 16:04:36.720: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:36.760: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:36.760: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 426K, 7% free 7693K/8263K, paused 1ms+2ms
05-25 16:04:37.330: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:37.350: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:37.350: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 437K, 7% free 7686K/8263K, paused 1ms+2ms
05-25 16:04:37.880: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:37.910: DEBUG/dalvikvm(28656): threadid=1: still suspended after undo (sc=1 dc=1)
05-25 16:04:37.910: DEBUG/dalvikvm(28656): GC_CONCURRENT freed 434K, 7% free 7689K/8263K, paused 1ms+3ms


Is your app limited to portrait and you're running it on a tablet (which is landscape by default), if so, this is why.


I am developing on an Asus Eee Pad Transformer with the keyboard dock. I notice that when you press Enter on a form, which you have added an OnEditorActionListener() to, it gets called twice!

    etPassWord.setOnEditorActionListener(new OnEditorActionListener() {
        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            if (!clickedIme) {
                clickLogIn();
                clickedIme = true;
            }
            return true;
        }
    });

And so I added the clickedIme boolean flag to suppress the second clickLogIn() call. Note that you would have to reset clickedIme to false when it fails, so you don't suppress further Enter presses.

0

精彩评论

暂无评论...
验证码 换一张
取 消