Android crash when launching app AFTER hitting home button and relaunching app.

Asked on March 11, 2017 in Technical.

I have deep linking working but I’m getting a strange crash in my Android implementation.

 

Here are the steps to reproduce the problem:

  1. Install app and run it normally.
  2. Exit app and remove it from memory (DON’T uninstall, just make sure it’s out of memory)
  3. Launch the app using a deep link
  4. The app functions as expected
  5. Hit the home button which puts the app in the background and goes to the launcher screen.
  6. Hit the app icon which brings the app back into focus
  7. CRASH

This only seems to happen if the app is ALREADY installed and launched using a deep link.  If the app isn’t installed and must be installed as part of clicking on the deep link, this behavior doesn’t occur.

On top of the already weird behavior, I can’t figure out where it’s crashing.  Here is the crash log:

03-10 16:13:21.215 13901-13901/com.xxxx.videocollaboration.app E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Unable to destroy activity {com.xxxx.videocollaboration.app/com.xxxx.videocollaboration.app.activities_fragments.CXMainActivity}: java.lang.IllegalArgumentException: No view found for id 0x7f0b0088 (com.xxxx.videocollaboration.app:id/fragment_container) for fragment CXStartupFragment{42193e78 #0 id=0x7f0b0088} at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3337) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3355) at android.app.ActivityThread.access$1300(ActivityThread.java:140) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1290) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4921) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalArgumentException: No view found for id 0x7f0b0088 (com.xxxx.videocollaboration.app:id/fragment_container) for fragment CXStartupFragment{42193e78 #0 id=0x7f0b0088} at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1293) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.FragmentManagerImpl.dispatchReallyStop(FragmentManager.java:2915) at android.support.v4.app.FragmentController.dispatchReallyStop(FragmentController.java:249) at android.support.v4.app.FragmentActivity.onReallyStop(FragmentActivity.java:816) at android.support.v4.app.FragmentActivity.doReallyStop(FragmentActivity.java:795) at android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:388) at android.support.v7.app.AppCompatActivity.onDestroy(AppCompatActivity.java:209) at com.xxxx.videocollaboration.app.activities_fragments.CXMainActivity.onDestroy(CXMainActivity.java:294) at android.app.Activity.performDestroy(Activity.java:5352) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1124) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3324) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3355)  at android.app.ActivityThread.access$1300(ActivityThread.java:140)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1290)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:4921)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)  at dalvik.system.NativeStart.main(Native Method)

Mobility Initiative — Developer
1 Answer(s)
Answered on March 12, 2017.

Hi – thanks for posting the question and sorry that you are facing this issue. Could you share these and your account details with our integrations team here? Thanks!

Developer