xamarin-fingerprint
xamarin-fingerprint copied to clipboard
Cannot Install Release version of Android app with Linking enabled
Steps to reproduce
-
Add xamarin-fingerprint to a Visual Studio 2019 project, add setup code
-
Set Release config of Visual Studio project to "Linking = SDK Assemblies Only"
-
Compile and deploy to an Android device.
Expected behavior
It should compile and deploy successfully to the Android device
Actual behavior
Build succeeds but installation fails (message "Installation of the app failed.")
Crashlog
If something causes an exception paste full stack trace + Exception here
Configuration
Development Environment: Visual Studio 2019 on Windows "Use incremental Android packaging system" ticked Android Package Format = "bundle" Dex compiler = "d8"
Version of the Plugin: 2.1.4
Platform: Android version 10
Device: Nokia 3.4 (testing device but happens on another device too)
I am not using "Code Shrinker" (r8 or ProGuard), I am using Linker setting of "Sdk Assemblies Only" not "Sdk and User Assemblies", so the suggestion here does not apply https://github.com/smstuebe/xamarin-fingerprint#android-code-shrinker-proguard--r8.
I have to set Linker = None in order for the Installation to work. Of course, that means the app will be bigger than it should be.
Hi @gordonsaxby,
I'm the friendly issue checker. Thanks for using the issue template :star2: I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.
Can anyone help with this (rather key) issue?
same problem with me, proguard now obsolete, trying to use r8 and d8 with ' sdk assemblies only' option but can't run on emulator or real device. crashes on immediate start of app.
Some sort of official comment at least, if not a solution, would be appreciated to acknowledge the issue.
@gordonsaxby can you provide logs? If the installation fails, there should be a reason (VS output, android system logs, adb logs)
@gordonsaxby can you provide logs? If the installation fails, there should be a reason (VS output, android system logs, adb logs)
It appears that the installation failure was because the installed version was compiled in debug mode. I removed the app from the device and then the installation worked.
However, the problem still exists - if I enable Linking = "Sdk Assemblies Only" the app starts (splash screen shows) and then crashes. The app uses "App Center" to record crashes but nothing is logged, so it can't be getting to "OnStart" which is where the AppCenter initialisation takes place.
I have a proguard.cfg file as recommended but it does not appear to help.
I have tried using "LogCat" in Visual Studio but I do not understand it enough to extract anything useful!
My settings are: