[英]How to solve failed linking file resources on Android Studio 3 error?
[英].net MAUI Splash screen android error - failed linking file resources
我正在嘗試按照文檔中的說明添加啟動畫面:
<MauiSplashScreen Include="Resources\appsplash.svg" Color="#fff" />
資源位於具有“MauiSplashScreen”構建操作的適當目錄中
在 windows 上可以正常調試,但嘗試在 android 上構建/調試會出現以下錯誤:
Error APT2061 failed linking file resources.
Error APT2260 resource drawable/appsplash (aka appname:drawable/appsplash) not found.
有任何想法嗎?
在官方文檔中, Include="Resources\appsplash.svg"
是完整路徑,因此您可以更改代碼,例如:
<MauiSplashScreen Include="Resources\Raw\appsplash.svg" Color="#fff" />
另外splash svg的build action是None,可以打開Splash Folder查看。
所以我建議你把它放在 Splash 文件夾中,並將它的構建動作設置為無。 就像默認項目一樣。
它是 SVG 的格式; 不確定格式到底出了什么問題,但添加不同的 SVG 解決了這個問題
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.