can't open the file apk

rafinrafin Member ✭✭

When I publish my apk, and I try to open it on my physical android device, it says "can't open the file". The apk is debugged, still is not working.
Any solution for this?

Answers

  • DimChrisDimChris USMember ✭✭✭

    Did you had apk already installed? if yes try to delete old one and making clear install

  • rafinrafin Member ✭✭

    No, I am not able to install any of my published apk. Initially I had the "debugging enabled" alert message. I solved that alert with this code in assemblyInfo.cs

    if DEBUG

    [assembly: Application(Debuggable=true)]

    else

    [assembly: Application(Debuggable = false)]

    endif

    Screenshot: goo.gl/FSmgMy

    The line number 30 "[assembly: Application(Debuggable=true)]" is greyed out, but at least I am not having the debug alert.

  • mwasimmwasim USMember ✭✭

    @rafin right click on the Android project and choose the option "Archive...". When Archive is completed, click the button "Distribute..." and choose Ad Hoc distribution to generate the apk. The generated apk should work fine on your Android device.

  • mwasimmwasim USMember ✭✭

    This blog post might also be useful in this regard,
    https://blog.xamarin.com/android-archiving-and-publishing-made-easy/

  • ReihanehKhaksaranReihanehKhaksaran USMember ✭✭

    @rafin Have you been able to resolve this issue? I'm facing the same problem :(

  • Ahsan_SiddiqueAhsan_Siddique PKMember ✭✭✭✭

    @rafin said:
    When I publish my apk, and I try to open it on my physical android device, it says "can't open the file". The apk is debugged, still is not working.
    Any solution for this?

    Hello rafin,

    Please follow this video.

    https://youtube.com/watch?v=j5hnbKJelH8

Sign In or Register to comment.