3 months
ago I generated an apk
file of Xamarin.Android
project following the steps of the following link:
https://riptutorial.com/xamarin-android/example/29653/preparing-your-apk-in-the-visual-studio
The apk
size was 65 MB
. I copied the apk
on my phone, installed the app, the app ran and everything was fine. I continued to work on the project for the next 3 months
, then I tried to generate an apk
following the steps from the same link, I succeded but the size of the generated apk
was 10 MB
which is not normal because during these 3 months I've been adding code and files to the project, the second apk
must have been bigger than the first one (bigger than 65 MB
). When I copied the apk
on the phone and installed the app, when I executed it, I got Unfortunatelly the app has stopped
error message. During the first apk
creation I created an Android Key Store
but before the second apk
creation I deleted it by mistake so I had to create new one. I don't know if that has anything to do with the problem.
I installed the apk succesfully, but when I tried to run the app I got: Unfortunatelly the app has stopped error message.
Try to disable Code shrinker and select Linker as None to see if problem persists.
Answers
Did you update visual studio during the 3 months ?
Maybe the project enables some options for Shrinking application by default while visual studio get update , refer https://devblogs.microsoft.com/xamarin/shrinking-android-app-size/ .
BTW , can you succeed in running the new creation(after renew key store) ?
I haven't updated Visual Studio in the last 3 months.
For the generation of the second apk I have followed the same steps I followed for the generation of the first apk. The steps from the following link:
https://riptutorial.com/xamarin-android/example/29653/preparing-your-apk-in-the-visual-studio
I don't want any shrinking of the apk size. If the project enables that, how can I disable it?
I installed the apk succesfully, but when I tried to run the app I got:
Unfortunatelly the app has stopped
error message.Try to disable Code shrinker and select Linker as None to see if problem persists.
I don't have
Code shrinker
option, maybe because myVisual Studio
is older. But when changingLinking
toNone
, that solved the problem.