Why does my Xamarin Android application suddenly require external storage permissions?

前端 未结 2 1691
-上瘾入骨i
-上瘾入骨i 2021-01-22 04:19

I have a Xamarin Android application I\'ve been trying to create an update for. Right when everything was hooked up and working, and I finally made the release APK, I get a mess

2条回答
  •  暖寄归人
    2021-01-22 04:31

    Look in AssemblyInfo.cs, default template has this on the bottom of it:

    [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
    [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
    

    Permissions can be set either through the AndroidManifest.xml file or through AssemblyInfo.cs. Delete those lines, and the permissions should not be set anymore.

提交回复
热议问题