如何修复Android Studio中的“gradle项目同步失败基本功能将无法正常工作”错误

问题描述 投票:-3回答:1

这是我的Build.gradle

“日志”[

    {
        "outputFile" "D:\\project\\HealthyLife\\app\\build\\intermediates\\incremental\\mergeDebugResources\\merged.dir\\values-lv\\values-lv.xml",
        "map"[
            {
                "source" "C:\\Users\\mustafa saleem\\.gradle\\caches\\transforms-1\\files-1.1\\appcompat-v7-27.1.1.aar\\3feff54b6487cbe05b10a566b3ca1591\\res\\values-lv\\values-lv.xml",
                "from" {
                    "startLines""2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19"
                    "startColumns""4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4"
                    "startOffsets" "105,225,333,442,528,632,754,836,918,1003,1112,1224,1323,1434,1543,1648,1822,1921"
                    "endColumns" "119,107,108,85,103,121,81,81,84,108,111,98,110,108,104,173,98,81"
                    "endOffsets""220,328,437,523,627,749,831,913,998,1107,1219,1318,1429,1538,1643,1817,1916,1998"
                },
                "to": {
                    "startLines" "2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,37",
                    "startColumns": "4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4",
                    "startOffsets": "105,225,333,442,528,632,754,836,918,1003,1112,1224,1323,1434,1543,1648,1822,4714",
                    "endColumns": "119,107,108,85,103,121,81,81,84,108,111,98,110,108,104,173,98,81"}}]}]

这是错误:(4,0)没有方法签名:java.lang.String.getAt()适用于参数类型:(build_b5jvjt9i1oac5ql84p80uvhqa $ _run_closure1)值:[build_b5jvjt9i1oac5ql84p80uvhqa $ _run_closure1 @ 4e132716]可能的解决方案:getAt(groovy。 lang.IntRange),getAt(groovy.lang.Range),getAt(groovy.lang.EmptyRange),getAt(groovy.lang.Range),getAt(groovy.lang.IntRange),getAt(java.lang.String)Open Fileenter image description here

java android android-studio gradle android-gradle
1个回答
-1
投票

试试这个:'File'>'Invalidate Caches / Restart'然后点击'Invalidate and Restart'按钮'

它会解决你的问题。

© www.soinside.com 2019 - 2024. All rights reserved.