報錯代碼:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
> Could not resolve com.android.tools.build:aapt2:4.1.0-6503028.
Required by:
project :app
> Could not resolve com.android.tools.build:aapt2:4.1.0-6503028.
> Could not parse POM https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/4.1.0-6503028/aapt2-4.1.0-6503028.pom
> ????в????????????
嘗試一:
答案網址:https://blog.csdn.net/qq_35928566/article/details/103474974
可能:無法合并資源,就是xml參考的原始組件,例如LinearLayout等組件參考錯誤,這種情況一般是Android Studio快取混亂所致,就是你開多個不同gradle的專案快取混亂了,
解決方法:Android studio點擊File → Invalidate Cache / Restart → Invalidate and Restart
等待重啟后解決
注意:點擊Invalidate and Restart之前只能有一個專案打開,不然重啟之后Gradle又會一起啟動然后沖突
未解決,真機模擬時仍報錯
嘗試二:
網上大多數的方法是:
把assets的檔案移至src/main/目錄下,
因為assets 目錄與res目錄應該放在同一級目錄下的,但是沒有創建assets

//待解決
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/189260.html
標籤:Android
上一篇:吉他指彈筆記
下一篇:iOS-多Target開發環境
