2

For the past days I had major issues with deploying the android version of my app. I found out that I am only ever able to get the app to work when "Fast Deployment" is checked. However, this means I can never archieve my app. If fast deploy is enabled, the app, even though it is in release mode, is treated like a DEBUG build and therefore not accepted in the playstore. If i uncheck fast deploy for release builds the app starts and then idles, not doing the first rest call it is supposed to do. If I leave the rest calls out, the app again works.

How can this be correlated?

1
  • 1
    Please could you post some more information, such as error logs? Commented Nov 27, 2021 at 16:35

2 Answers 2

2

The symptom that it works when set "Fast Deployment" suggests this situation:

If you are testing a release build on a device that previously had a debug build, its possible that the debug version did not get fully uninstalled. Specifically, "Fast Deployment" stores the xamarin library as a separate DLL. Because your release build has the same "bundle id" as the debug build, Android can get confused.

To fix.

Best Fix for emulator:

  1. Tools / Android Device Manager / Select virtual device / Edit / Clear to Factory Defaults.

Quickest fix for phone (but not sure if it helps):

  1. Drag app to trash can.
  2. Power down the phone. Power it back on.
  3. Deploy release build to device. Either by installing apk, or by "Start Without Debugging" menu item.

Quick Fix:

  1. Run debug version again on the device. This makes sure Android "knows" that the debug version of app is there.
  2. Stop the app.
  3. On the device, "uninstall" the app. (Drag it to trash can).
  4. Deploy release build to device. Either by installing apk, or by "Start Without Debugging" menu item.

If that doesn't work, then use "adb uninstall":

  1. Run debug version again on the device. This makes sure Android "knows" that the debug version of app is there.
  2. Stop the app.
  3. menu Tools / Android / Android Adb Command Prompt.
  4. adb uninstall com.companyname.appname <-- substitute your app's bundle id
  5. deploy release build to device.
Sign up to request clarification or add additional context in comments.

Comments

1

It turnes out that turning ON my linker to link assemblies only actually decreased the app size AND made everything work again. Before, the linker was set to LINK NONE (which should've been the safer bet, but turned out to be an error...).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.