【发布时间】:2021-01-16 01:56:04
【问题描述】:
当我为 Android 构建时,我收到此错误:
Error The "ShellTask_v2ed6794b633a8ebf33d51d6d21f9d6a587ebe09e"
task was not given a value for the required parameter
"TargetFramework".
查看构建输出,我看到它完成了构建UnoTest.dll,然后立即报告错误。在控制台输出中,还有更多信息:
C:\Users\...\.nuget\packages\uno.wasm.bootstrap\1.3.4\build\Uno.Wasm.Bootstrap.targets(126,2):
error MSB4044: ... (and then the same as above)
当我尝试进行 Android 构建时,它引用了与 Wasm 相关的内容,这似乎很奇怪。
构建完成,应用程序同时针对 UWP 和 Wasm 运行。而且,事实上,它在更早的时候就已经在 Android 上运行了。我开始添加一些 HttpClient 代码,这似乎与导致此错误有关。我把所有这些都注释掉了,但错误仍然存在。
有什么想法可以看吗?
编辑:
这后面跟着错误
CS1061 'MainPage' does not contain a definition for 'InitializeComponent'
and no accessible extension method 'InitializeComponent'
accepting a first argument of type 'MainPage' could be found
我已将左上角的下拉菜单设置为 UWP,以获取 c# 文件,然后重新启动 VS。这似乎没有帮助。
【问题讨论】:
标签: android uno-platform