問題:ActivityA與共享單元轉變開始ActivityB間歇崩潰 不一致地重現 API級別:23,24和25拋出:IllegalArgumentException在ActivityManagerProxy
代碼以啓動活動:
Intent intent = new Intent(this, ActivityB.class);
Pair<View, String> logoTransition = Pair.create(logo, getString(R.string.transition_logo));
Pair<View, String> logoTextTransition = Pair.create(logoText, getString(R.string.transition_logo_text));
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(this, logoTransition, logoTextTransition);
ActivityCompat.startActivity(this, intent, options.toBundle());
Stacktrace(API 23):
Exception java.lang.IllegalArgumentException:
android.os.Parcel.readException (Parcel.java:1606)
android.os.Parcel.readException (Parcel.java:1555)
android.app.ActivityManagerProxy.isTopOfTask (ActivityManagerProxy.java:4787)
android.app.Activity.isTopOfTask (Activity.java:5753)
android.app.Activity.cancelInputsAndStartExitTransition (Activity.java:4075)
android.app.Activity.startActivityForResult (Activity.java:4052)
android.app.Activity.startActivity (Activity.java:4312)
android.support.v4.content.ContextCompat.startActivity (ContextCompat.java)
__null__.getDrawable (ContextCompat.java)
__null__.isDeviceProtectedStorage (ContextCompat.java)
com.my.app.activity.ActivityA.startMainActivity (ActivityA.java)
有誰知道是什麼原因導致此行爲? 對此有何建議修復?
什麼什麼情況下是這樣'startActivity()'調用,即什麼課是你嗎? – azizbekian
從活動 –
調用請參閱此鏈接(http://stackoverflow.com/questions/26688374/android-activity-transitions-using-support-v4-up-to-date-with-android-l)希望這會幫助你。 –