-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Android] Updated to latest Xamarin.Android.Support packages, release APK generated is now non-functioning #2495
Comments
Do you have a sample project where we could see the exception by chance? I have a few projects running at 27.0.2 and I'm not having this issue. I've seen a few people having issues around ProGuard and needing to modify the proguard config file. Do you have ProGuard enabled? |
I don't even know where I would be able to see what the exception is since it's only in release that this happens But it looks like if I disable ProGuard it does run properly, which is still strange, since ProGuard is enabled in the debug build |
With the debug build you might have linking setup differently (Full vs None) which causes some down stream differences. I have an app with proguard and 27.0.2 running and it seems to be running fine (no crashes reported yet) i left a comment here |
I forgot to say the Linking is set to |
I'd start by looking at log cat when the app starts you'll most likely see some class that it can't find which you'll need to tell the linker to skip and/or setup an ignore in your proguard.cfg file |
It's look like it's probably Edit: If I add |
So in your proguard.cfg file you can add
or be more specific with
and that should fix it for you |
Actually, I don't have a CFG for ProGuard, I see there's one generated in How do I go about adding one, or should I in this case? |
this talks about adding the proguard file https://docs.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/proguard?tabs=vswin it's pretty easy the only caveat is if you're on windows to be sure to read this part |
My only concern is all of the configurations that were generated automatically, if I specify my own configuration, will these be lost? Or should I copy what's in the automatically generated one into my own? |
no they won't be lost |
Ok great, thanks a lot |
Description
Several Xamarin.Android.Support packages were version 26.1.0.1, I updated the packages to the current version 27.0.2, and the release APK generated is now 8 MB less than the debug build and crashes immediately on run
Debug build is 45156kb, release is 37217kb - This discrepancy was never the case before updating the Nuget packages
The project configurations are the same for the debug and release build
Steps to Reproduce
Expected Behavior
I expect the application to be runnable
Actual Behavior
The app crashes immediately
Basic Information
Screenshots
Reproduction Link
The text was updated successfully, but these errors were encountered: