Xamarin - Visual Studio stuck at zipalign.exe

2020-06-07 06:44发布

When trying to deploy an app in Android Device, VS is stuck here:

1>C:\Users\George\AppData\Local\Android\android-sdk\build-tools\23.0.1\zipalign.exe 4 "C:\Users\George\Documents\Visual Studio 2015\Projects\SGUotA-Xamarin\BBXamarin\BBXamarin\BBXamarin.Droid\bin\Debug\BBXamarin.Droid-Signed-Unaligned.apk" "bin\Debug\BBXamarin.Droid-Signed.apk"

Can anyone propose a solution for this? screenshot of the problem

9条回答
对你真心纯属浪费
2楼-- · 2020-06-07 07:20

I had the same problem, and after upgrading Android SDK Build-tools from 23.0.1 to a newer version in the Android SDK Manager, the problem was solved.

查看更多
叼着烟拽天下
3楼-- · 2020-06-07 07:22

I came across the same issue in Visual Studio 2015 using any emulator. In my case, it turned out that I had to change a packaging option to get rid of the problem.

  1. Go to your project settings.
  2. Select Android Options.
  3. Choose the tab Packaging.
  4. Deselect the Use Fast Deployment option as shown in the screenshot.
  5. Hit the F5 key and there you go :-)

The deployment appears to be a touch slower, however, the emulator executes the software much faster. Enjoy!

enter image description here

查看更多
太酷不给撩
4楼-- · 2020-06-07 07:32

None of the solutions present on the web(regedit, clean, uninstall, restart, etc...) solved the issue for me. I ended up reading through xamarin's bugzilla log and found that the solution is to have the emulator running prior to trying to deploy. If you simply build, then deploy and let visualstudio launch the emulator it will hang. However, if you launch the emulator from the Android AVD Manager then deploy via visualstudio, it will run deploy cleanly.

查看更多
登录 后发表回答