3

I am having Release Build crashes due to Error inflating class android.support.design.widget.CoordinatorLayout. I have never used the CoordinatorLayout in my code, so I'm thinking it us being excluded by the Linker. The app runs when linking is set to None, and crashing starts when set to "Sdk Assemblies Only".

I have had a similar error before and I was able to solve it by adding the text Xamarin.Android.Support.v7.AppCompat;Xamarin.Android.Support.v4 to the Skip linking assemblies box (credit to mariusk).But this isn't working for android.support.design.widget.CoordinatorLayout

Skip Linking Assemblies box.

In order to help me and anyone else having issues like this in the future:

How to tell what text to put in the Skip linking assemblies box based on the missing assembly?

For example, my current error message is for android.support.design.widget.CoordinatorLayout, but adding android.support.design;android.support.design.widget; doesn't work.

Moffen
  • 1,817
  • 1
  • 14
  • 34
  • You can try to change ProGuard configuration like this link https://stackoverflow.com/a/46510941/10627299 – Leon Jun 11 '19 at 15:44
  • What activity does your MainActivity extend, and what is your style? – Bruno Caceiro Jun 11 '19 at 19:43
  • @BrunoCaceiro I have 3 Activities the app loads through before it reaches the MainActivity.cs. All 3 loading Activitys extend Activity, but MainActivity extends Android.Support.v7.App.AppCompatActivity and implements Android.Support.Design.Widget.NavigationView.IOnNavigationItemSelectedListener. The app loads through the 3 loading activities successfully and only crashes on the MainActivity. maybe there is a possible linking problem with AppCompatActivity? – Moffen Jun 11 '19 at 21:57
  • @LeonLu-MSFT Are you sure it could be something with the ProGuard, seeing as it is turning the Linker on and off that can fix the problem? Will try now anyway – Moffen Jun 11 '19 at 22:09
  • Do you have any update for this issue? – Leon Jun 14 '19 at 09:32
  • @LeonLu-MSFT Sorry I've still just got linker turned off – Moffen Jun 16 '19 at 21:17

0 Answers0