4

I'm developing a Xamarin.Forms App (early stages) and have just set up AppCenter to build and distribute it. AppCenter takes the Xamarin.Android project, builds it successfully, signs with the same debug keys and makes the .apk available for download. I've tested in two different devices and the app installs successfully but won't run (opens and closes straightaway), no errors are shown.

If I deploy the app from Visual Studio it works fine.

  • Xamarin.Forms 3.4.0.1008975
  • Mono.Android v4.0.30319 (Xamarin.Android)
  • Minimum Android 4.4 / Target 8.1
  • Tested on Android 6 and 9 (both work if deployed from Visual Studio, and don't work with the distributed release from AppCenter)

Logcat:

Time    Device Name Type    PID Tag Message
03-16 18:13:55.483  Sony D6503  Warning 1326    WindowManager   java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@8108048 does not exist
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8890)
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8881)
at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2766)
at com.android.server.wm.Session.remove(Session.java:187)
at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3103)
at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5610)
at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3413)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:234)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
03-16 18:13:55.483  Sony D6503  Warning 1326    WindowManager   Failed looking up window
03-16 18:13:55.474  Sony D6503  Warning 1326    ActivityManager Force removing ActivityRecord{6a47b30 u0 com.companyname/md5dac3b7b583c4c7d6c1c265db80217d7a.MainActivity t28}: app died, no saved state
03-16 18:13:55.424  Sony D6503  Error   27642   monodroid   No assemblies found in '/data/user/0/com.companyname/files/.__override__' or '/storage/emulated/0/Android/data/com.companyname/files/.__override__'. Assuming this is part of Fast Deployment. Exiting...

Any suggestion is strongly appreciated.

Fabio
  • 791
  • 1
  • 7
  • 27
  • 1
    `logcat` output? – SushiHangover Mar 16 '19 at 10:48
  • @SushiHangover Good call. Definitely gives some information but still, I don't understand the root issue here. – Fabio Mar 16 '19 at 18:18
  • 2
    I’ve had this happen before if the mono version you selected in your build config differs to your version in VS. it’s just something to check and confirm. Alternatively, use the support chat, they’re usually pretty good and is pretty much a direct line through to development. – Skin Mar 16 '19 at 21:21

1 Answers1

3

The solution to this problem was to disable the "Use Shared Runtime" property from the project options.

Instructions:

  1. Right click on the android project
  2. Go to Android Options
  3. Uncheck "Use Shared Runtime"
  4. Commit && push the changes
  5. Trigger a new build on AppCenter
Fabio
  • 791
  • 1
  • 7
  • 27