错误 MSB4064:“AllowUnsecureUrls"“XamarinDownloadArchives"不支持参数任务 [英] Error MSB4064: The "AllowUnsecureUrls" parameter is not supported by the "XamarinDownloadArchives" task

查看:29
本文介绍了错误 MSB4064:“AllowUnsecureUrls"“XamarinDownloadArchives"不支持参数任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我在构建 Android Release 时遇到此错误.调试时一切正常.它甚至不会清洁溶液.事情很好,现在更新到最新的 Xamarin 后.这就是我的 Droid 项目前几行的样子

So, I am getting this error on building Android Release. On debug things are fine. It wont even clean the solution. Things were fine and now after updating to latest Xamarin. This is what my Droid project top few lines look like

<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\packages\Xamarin.Build.Download.0.6.0\build\Xamarin.Build.Download.props" Condition="Exists('..\packages\Xamarin.Build.Download.0.6.0\build\Xamarin.Build.Download.props')" />
  <PropertyGroup>```

推荐答案

一个简单的方法就是设置android:usesCleartextTraffic="true" on you AndroidManifest.xml

A simple way is set android:usesCleartextTraffic="true" on you AndroidManifest.xml

android:usesCleartextTraffic="true"

你的 AndroidManifest.xml 看起来像

Your AndroidManifest.xml look like

<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.dww.drmanar">
   <application
       android:icon="@mipmap/ic_launcher"
       android:label="@string/app_name"
       android:usesCleartextTraffic="true"
       android:theme="@style/AppTheme"
       tools:targetApi="m">
       <activity
            android:name=".activity.SplashActivity"
            android:theme="@style/FullscreenTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
       </activity>
    </application>
</manifest>

希望对你有所帮助.

这篇关于错误 MSB4064:“AllowUnsecureUrls"“XamarinDownloadArchives"不支持参数任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆