Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Install Release version of Android app with Linking enabled #210

Open
gordonsaxby opened this issue Aug 24, 2021 · 6 comments
Open

Comments

@gordonsaxby
Copy link

Steps to reproduce

  1. Add xamarin-fingerprint to a Visual Studio 2019 project, add setup code

  2. Set Release config of Visual Studio project to "Linking = SDK Assemblies Only"

  3. 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.

@smsissuechecker
Copy link

Hi @gordonsaxby,

I'm the friendly issue checker.
Thanks for using the issue template 🌟
I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

@gordonsaxby
Copy link
Author

Can anyone help with this (rather key) issue?

@Rishantkr
Copy link

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.

@gordonsaxby
Copy link
Author

Some sort of official comment at least, if not a solution, would be appreciated to acknowledge the issue.

@smstuebe
Copy link
Owner

smstuebe commented Oct 4, 2021

@gordonsaxby can you provide logs? If the installation fails, there should be a reason (VS output, android system logs, adb logs)

@gordonsaxby
Copy link
Author

@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:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants