0

I'm getting the following error wnen I try to run my app in debug mode with VSMac. I am using Xamarin Forms. I think I am on the latest vsmac and xamarin forms. My android sdk appears to be upto date. Any ideas on this issue? I'm thinking that the error is because something is in the wrong directory. I've been looking at my directories and I think everything is right. I've got my iOS version running. Error message is below.

TIA.

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2290,2): error MSB6003: The specified task executable "zipalign" could not be run. System.ComponentModel.Win32Exception (0x80004005): ApplicationName='/Users/wallym/Library/Developer/Xamarin/android-sdk-macosx/build-tools/30.0.2/zipalign', CommandLine=' -p 4 "/Users/wallym/Projects/McClureRealtyMobileApp/McClureRealty.Android/obj/Debug/android/bin/com.wallym.mcclurerealty.mcclure_realty.apk" "bin/Debug//com.wallym.mcclurerealty.mcclure_realty-Signed.apk"', CurrentDirectory='', Native error= Access denied
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2290,2): error MSB6003:   at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2290,2): error MSB6003:   at System.Diagnostics.Process.Start () [0x0003a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2006 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2290,2): error MSB6003:   at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2290,2): error MSB6003:   at Microsoft.Build.Utilities.ToolTask.ExecuteTool (System.String pathToTool, System.String responseFileCommands, System.String commandLineCommands) [0x000c9] in /Users/builder/jenkins/workspace/build-package-osx-mono-pullrequest/pr/external/bockbuild/builds/msbuild-15/src/Utilities/ToolTask.cs:711 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(2290,2): error MSB6003:   at Microsoft.Build.Utilities.ToolTask.Execute () [0x00433] in /Users/builder/jenkins/workspace/build-package-osx-mono-pullrequest/pr/external/bockbuild/builds/msbuild-15/src/Utilities/ToolTask.cs:1519 
Wallace B. McClure
  • 1,165
  • 1
  • 15
  • 31
  • Do you signing the APK in your project? Because Zipalign the APK is used to optimize the file Before signing an APK. – Cherry Bu - MSFT Aug 23 '21 at 05:47
  • I am trying to debug on my a pixel device connected to my machine. That is when I get this error. – Wallace B. McClure Aug 23 '21 at 15:12
  • Do your try to create new blank project to debug? Still having this error message? – Cherry Bu - MSFT Aug 25 '21 at 05:35
  • I just created a new app in VSMac. I updated the nuget packages, which updated the xamarin forms package, xamarin essentials, and the androidx packages. I am getting the same error zipalign message. I am attempting to run in debug mode on my Pixel 3 XL. any ideas? I'm assuming it is something local, but am not sure what it is. – Wallace B. McClure Aug 25 '21 at 12:55
  • Just looking at the new error, it states "access denied" which suggests a security issue on access this directory at some point. – Wallace B. McClure Aug 25 '21 at 12:58
  • 1
    It was a permissions issue on zipalign. Somehow, the execute permission was not on zipalign. I have added that, and the problem has been resolved. I followed this suggestion - https://social.msdn.microsoft.com/Forums/en-US/00146bc9-7073-4053-8a90-1d26aef89d33/the-quotaaptquot-task-failed-unexpectedly-access-denied-for-android?forum=xamarinvisualstudio – Wallace B. McClure Aug 25 '21 at 13:33
  • @WallaceB.McClure you should add that as answer. It was also my case. – eestein Oct 20 '21 at 14:48

0 Answers0