VS 2015 Xamarin: Warning IDE0006 Error encountered while loading the project

前端 未结 7 1166
太阳男子
太阳男子 2020-12-17 21:54

I am developing an Android app using Xamarin.

Visual Studio shows this warning, and I don\'t know what it means. I\'ve followed the instructions but I can\'t seem t

相关标签:
7条回答
  • 2020-12-17 22:14
    • Save and close your project.

    • Go to your path folder.

    • Move the bin and obj folders from the Android folder to another location.

    • Run the project again.

    Moving these folders means deleting them and backing them up just in case!

    I solved it this way. I hope it helps. :)

    0 讨论(0)
  • 2020-12-17 22:14

    I also had this annoying experience, in App2.Droid "Warning IDE0006 Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled." ... but I seem to have fixed it on my pc.

    At certain times when rebuilding my project I also had other errors than the usual ones, telling me

    to install package: 'Xamarin.Android.Support.[BLABLA]'
    
    unzipping has failed:
    Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
    in the C:\Users[UserName]\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.0.1.3\content directory
    
    Reason: File C:\Users[UserName]\AppData\Local\Xamarin\zips\96659D653BDE0FAEDB818170891F2BB0.zip is not a ZIP archive
    

    1) Downloading the zip and installing it didn't solve my issues, I got fewer errors, but in general, the messages stayed the same, Please install package [BLABLA], Unzipping failed,...

    2) Next I took a look at the zip file they mention in C:\Users[UserName]\AppData\Local\Xamarin\zips and indeed, 96659D653BDE0FAEDB818170891F2BB0.zip was corrupt. I deleted this zip, did build my project again, and after the build process (this takes a while, leave it 'building': you see your zip reappear and growing to 135MB) all the previous warnings/errors were gone!

    It seems manually putting the unzipped files in place didn't work because VS was still trying to unzip the corrupt zip file. This zip file is unzipped after the first build of the droid project. I remember initially I manually stopped the building of the droid project several times because it was extremely slow and it appeared to hang: probably the first build action tried to download the zip file and unzip it, canceling (I might have even shot down VS one time) that build that took like forever (I had a terribly slow internet connection that evening) corrupted the zip.

    Note:

    • in C:\Users[UserName]\AppData\Local\Xamarin\zips there are several zip files, my error did tell me the name of the right one.
    • in C:\Users[UserName]\AppData\Local\Xamarin\Xamarin.Android.Support.Design I had several 23.X folders, one with content in its 'content' subdir, and one without: the 23.0.1.3 one, as specified in the error texts.

    Edit: basically what @trycatch answered, his first option is confirmed ;)

    0 讨论(0)
  • 2020-12-17 22:20

    Firstly, it's not an 'Error' it's a warning.

    Here's what actually happens:

    • Visual studio/xamarin check for required sdkbuild tools for your project
    • If you have it already in your SDK then no problem
    • If not, your project will show above warning in most of project cases.

    How to fix this :

    • Clean your solution
    • Rebuild it (at this stage visual studio will automatically try to download zips)
    • If you get Rebuild canceled error, then close visual studio and start again
    • At this stage it will definitely download required zips.
    • Again Clean -> Rebuild -> Build -> Close the visual studio and open it again

    Or Simplest alternative is

    Download all SDKBuild tools available.

    Your warning will be gone.

    Let me know if it works, coz its worked for me several times.

    0 讨论(0)
  • 2020-12-17 22:25

    I just followed the instructions but it did not eradicate the warning, although I ignored it, it does not appear now.

    1. When rebuilding the project, I noticed it takes a long time because it downloads a zipfile on your %userprofile%/AppData/Local/Xamarin/zips/*

    -Make sure to not interrupt the build because it will stop downloading and will cause an invalid zip later on, thus reproducing this issue?

    1. Another hypothesis is that I included a component(referenced a dll) and then deleted it, and then re-added it. (as I'm having trouble with intellisense)
    0 讨论(0)
  • 2020-12-17 22:29

    i had got this warning for 5 days. i applied this suggestion and problem is end.

    to install package: 'Xamarin.Android.Support.[BLABLA]'

    unzipping has failed: Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip in the C:\Users\[UserName]\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.0.1.3\content directory

    Reason: File C:\Users\[UserName]\AppData\Local\Xamarin\zips\96659D653BDE0FAEDB818170891F2BB0.zip is not a ZIP archive

    1) Downloading the zip and installing it didn't solve my issues, I got fewer errors, but in general, the messages stayed the same, Please install package [BLABLA], Unzipping failed,...

    2) Next I took a look at the zip file they mention in C:\Users\[UserName]\AppData\Local\Xamarin\zips and indeed, 96659D653BDE0FAEDB818170891F2BB0.zip was corrupt. I deleted this zip, did build my project again, and after the build process (this takes a while, leave it 'building': you see your zip reappear and growing to 135MB) all the previous warnings/errors were gone!

    0 讨论(0)
  • 2020-12-17 22:31

    I too had both Intellisense and compilation issues.

    On my Xamarin Forms and Android project, what worked for me is checking out the Resource.Designer.cs file in my Android project, quitting Visual Studio, and then re-opening it.

    Hope that helps somebody.

    0 讨论(0)
提交回复
热议问题