xamarin-forms-xamarindownloadarchives-task-error

The XamarinDownloadArchives task could not be initialized with its input parameters

I got this error today while building my Xamarin Forms project for Android.

The “XamarinDownloadArchives” task could not be initialized with its input parameters

The “AllowUnsecureUrls” parameter is not supported by the “XamarinDownloadArchivers” task. Verify the parameters exists on the task, and it is settable public instance property.

xamarin-forms-xamarindownloadarchives-task-error

 

Error: The “XamarinDownloadArchives” task could not be initialized with its input parameters.

Solution 1:  Install the latest version of Xamarin.Build.Download nuget package or update if already installed.

Solution 2: This will solve the error. If it doesn’t, please rebuild the base project with Android and iOS project unloaded and then Android and iOS project separately by reloading them.

Solution 3: Allow ClearText in your AndroidMaifestFile inside the application tag like below example.

<application android:label="XamOctanePlayer.Android" android:usesCleartextTraffic="true"></application>

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1" android:versionName="1.0"
package="com.companyname.XamOctanePlayer"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:label="XamOctanePlayer.Android" android:usesCleartextTraffic="true"></application>

</manifest>

Also on iOS you can allow non-HTTP connection to specific domain by editing info.plist.
Add this in your info.plist. This will allow insecure connections to domain and subdomain mentioned under key tag.

info.plist:

<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourtargethttp.com</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>