开发者

Android error, failed to set top app changed

Can somebody please throw some light on the arcane error "Failed to set top app changed", by the activity manager? I'm wondering what causes this error. In one of my application I'm making开发者_StackOverflow社区 a view fullscreen and then switching back. For the first time things are ok but then if i try to make the view full screen again, I get a crash and the error mentioned above is found on logcat.

Any help is greatly appreciated.

Reagrds, M


I just encountered this problem today myself.. let me tell you what did the trick for me... maybe it will help you too.

anyway in my case it crashed because i overrided onActivityResult and inside that event i tried to do this:

Bundle extra = data.getExtras();
    String albumId = extra.getString("id");

this is old code that got left in the application.. after deleting this everything worked as expected.

hope this helps in some way.


I had the same problem with my app, the activity crashed and "activity manager: fail to set top app changed!" in logs. Turned out to be one line of code in the onPause caused the problem. Check your onPause method of the Activity that launches the new Activity to see if something should not be done there. I think there could be many reasons causing this problem, but the basic idea is that the launching activity does something wrong when the new Activity is going to show up.


My problem was that i change orientation on activity start and needed to add android:configChanges="orientation" , like this:

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name" >
    <activity
        android:name=".RiskniMilionActivity"
        android:label="@string/app_name" 
        android:configChanges="orientation">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜