Issue
Android 10, moto g7.
Not having done Xamarin development for 2-3 years I was given a project in which to update various packages. In VS 2019 for Win 10 I updated and built the project, then I generated the APK. I then sent to APK via the USB to the phone. The problem is I cant install the APK. I enabled "Install from unknown sources" a bunch of apps like Files, Chrome etc., tried to install from them (like browsing to the APK with Files app), moved the file to the SD card, tried again but to no avail. Just for test I downloaded anAPK from the Internet and was able to install it. My question is: Do I need to sign the newly-generated APK? Or do something else?
Thanks
Solution
Yes you need to sign it. Make sure you select release configuration then right click on your Xamarin.Android project and click on archive. When done click on Distribute, Ad Hoc. In the plus sign it will allow you to generate an android keystore to sign it. Click on save as and you got ur apk signed.
Is there any reason you don't wanna deploy it directly from visual studio to the device? you can just select debug configuration, you will have to put your device on developer mode, enable usb debugging and then select your device from VS and deploy to the device. It will save you time for sure.
Good luck!
Answered By - user3912137
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.