Xamarin Android App crash to start in device

cuevaslexcuevaslex MXMember ✭✭

Hi!

I have an app developed with Xamarin Form. When i do an Build and release to HockeyApp my App crash to start in my device.
It seems that the App is in Debug mode like when compiling in Visual Studio but not. In the step to my Build Definition have to task "Signing and Aligning APK files" with "Sign the APK" option but it does not work.

Basically my application to deployed in HockeyApp but when it starts it closes immediately. It's no use saying when i sign the application since Visual Studio with "Ad Hoc" it work and my App its only a Hello World.

Any idea that you may be failing?
thanks!

Posts

  • Vlad_ServitolaVlad_Servitola USMember ✭✭

    What about Build Configuration? Is it Release for this apk? Did you tried to turn your linking option off on Release build? You can find it in proj properties

  • cuevaslexcuevaslex MXMember ✭✭

    you mean the Build Definition in VSTS or the project properties in Visual Studio IDE? My configuration to the task "Signing and aligning APK in the build definition its to see in the next image. My configuration in the properties of the project in Visual Studio/android options its uncheck, its seem see in the image.

    i've tried build the solution with this options but it does not work. any idea?

  • Vlad_ServitolaVlad_Servitola USMember ✭✭

    I can see configuration "Debug" on the first screen. On the top.
    In general I mean VS build configuration. It should be Release. Change it from visual studio toolbars.
    Alose you should change Debug to Release setting for the screens you attached and check settings for release.

  • cuevaslexcuevaslex MXMember ✭✭

    I tried to change the configuration to Release, but now at the time of saving the change, I noticed that the configuration remains in Debug, it seems as if I did not store the change. I do not understand now why he does this. What I have tried is to publish the app with Ad Hoc from visual studio and the apk that it gives me works without problems even when it seems that the configuration is like Debug. I do not know what may be happening.

  • cuevaslexcuevaslex MXMember ✭✭

    I finally found the solution! I needed to indicate the option of Zipalign, since just as it is necessary to sign the apk, it is also necessary to indicate this option according to the Android documentation, and yes, I actually selected this option in the VSTS Build Definition and it worked correctly. I also did the compiling test from android sdk manually and it also works properly.

    References:
    https://developer.android.com/studio/command-line/zipalign.html

    Vlad, thank you for your help!

  • @Vlad_Servitola said:
    What about Build Configuration? Is it Release for this apk? Did you tried to turn your linking option off on Release build? You can find it in proj properties

    I turned off linking option on Release Build, this works for me!! Thanks a lot!!

Sign In or Register to comment.