Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to resolve Xamarin Android linking problem

$
0
0

My Xamarin Forms Android app works fine in Debug. But in Release, when deployed to either the emulator or to a device, the app is "stopped" after showing the splash screen. The debug log shows these errors, indicating that it can't find class FitWindowsLinearLayout...

  • 10-23 22:24:59.270 14008 14008 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #14: Binary XML file line #14: Error inflating class android.support.v7.widget.FitWindowsLinearLayout

  • 10-23 22:24:59.270 14008 14008 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #14: Error inflating class android.support.v7.widget.FitWindowsLinearLayout

  • 10-23 22:24:59.270 14008 14008 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.FitWindowsLinearLayout" on path: DexPathList[[zip file "/data/app/zeemerix.NflCalcXF-1/base.apk"],nativeLibraryDirectories=[/data/app/zeemerix.NflCalcXF-1/lib/arm, /data/app/zeemerix.NflCalcXF-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]

Changing Linking to "None" resolves the problem, but then the APK is very large.
Should I use "Skip Linking Assemblies"? If so, what to enter?

I tried using a Proguard profile, but when I do, then the MainPage appears as a blank screen, and the debug log says it can't find Help_ObClick(), which is an event handler in the MainPage code behind. The profile I used is this...

-dontobfuscate
-keep class android.support.v7.widget.** { *; }
-dontwarn android.support.v7.widget.**
-keep class android.support.v4.widget.Space { *; }
-dontwarn android.support.v4.widget.Space

My Andrpoid Options:
-- Off: Use shared runtime
-- On: Enable Proguard
-- On: Enable developer instrumentation
-- Linking: Sdk and User Assemblies [Setting it to None resolves problem]

-- Compile using Android version: 8.1
-- Min Android version: 7.0
-- Target Android version: 9.1

My setup:
-- VS Community 2017, Version 15.7.3
-- Xamarin 4.10.10.1
-- Xamarin Android SDK 8.3.3.2
-- Xamarin Forms 3.3.0.912540
-- Xamarin support libraries v27.0.2.1


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>