Xamarin Android SDK Manager Causing Errors

ReidKirkpatrick.0276ReidKirkpatrick.0276 USMember ✭✭

I've tried using the Xamarin Android SDK Manager on three different machines and each time, after installing relevant packages, using sdkmanager or avdmanager from the command line no longer works due to parsing exceptions. Example:

C:\android-sdk\tools\bin>sdkmanager --list
Warning: cvc-elt.4.2: Cannot resolve 'sdk:platformDetailsType' to a type definition for element 'type-details'.
Warning: cvc-type.2: The type definition cannot be abstract for element type-details.
Warning: unrecognized type name: {http://schemas.android.com/repository/android/common/01}platformDetailsType. Did you mean {http://schemas.android.com/sdk/android/repo/repository2/01}platformDetailsType?
Warning: Unable to create an instance of com.android.repository.impl.generated.v1.TypeDetails
Warning: Found corrupted package.xml at C:\android-sdk\platforms\android-25\package.xml

Should be reproducible by downloading the latest version of the Android tools (Direct) and Platform tools and then pointing the Visual Studio Android sdk location to the root folder where you unzipped the two archives. Use the Xamarin Android SDK Manager to install Android SDK Platform 25. Then from the command line run the above command. You should get the errors. If you run the command again, the sdk has corrected the suspect xml, but I've run into other similar parsing errors (during avd creation) that have not corrected themselves. Why are the files that the Xamarin Android SDK Manager installs different that what Google's sdkmanager.bat installs?

Answers

  • After a bit more searching and testing, as a workaround you should be able to do a search for "package.xml" in your sdk folder and delete them all (back them up if you are wary). They appear to be recreated by the sdkmanager as needed. It would still be nice to know why the schemas of the xml files coming from the Xamarin Android SDK Manager are different than those coming from the google sdkmanager.bat

  • NateVargheseNateVarghese USUniversity ✭✭
  • PeterFarrerPeterFarrer USMember ✭✭

    @ReidKirkpatrick.0276 works perfectly, thank you

Sign In or Register to comment.