Xamarin Forms Android Error: Please install package 'Android Support Library'

后端 未结 13 1269
名媛妹妹
名媛妹妹 2020-12-01 12:56

I recently uploaded my project to Git, and used a auto-generated Xamarin/Windows/MacOS/VisualStudio .gitignore file. I did a lot of work and testing on iOS, but now I\'m com

13条回答
  •  情书的邮戳
    2020-12-01 13:20

    I went through the same problem and I have just fixed using the following steps:

    • Delete the *.zip files from the folder:

    C:\Users\YOUR_USER\AppData\Local\Xamarin\zips\

    • Delete the folders starting with "Xamarin.Android.*":

    C:\Users\YOUR_USER\AppData\Local\Xamarin\Xamarin.Android.*

    • Navigate to the directory of your solution and delete all the "bin" and "obj" folders

    • Make sure you have the latest Java SDK. In my case the latest one is JDK 1.8:

    C:\Program Files\Java\jdk1.8.0_111

    • In my case I didn't have the latest java SDK so I searched in google for "Java SE Development Kit Downloads". It took me to the Oracle website page about "Java SE Development Kit 8 Downloads". I downloaded the file "jdk-8u111-windows-x64.exe" (194.64 MB). After the installation it created a folder "C:\Program Files\Java\jdk*\".

    • Make sure your Xamarin is pointing to this JDK:

    In the Visual Studio go to "Tools -> Options -> Xamarin -> Android Settings -> Java Development Kit". In my case I set it to "C:\Program Files\Java\jdk1.8.0_111"

    • Now you should right click in your solution and "Clear solution" and after that you should "Rebuild Solution"

    I hope it helps.

提交回复
热议问题