AndResGuard icon indicating copy to clipboard operation
AndResGuard copied to clipboard

Could not find SevenZip-1.2.17-osx-aarch_64.exe (com.tencent.mm:SevenZip:1.2.21).

Open lomoya90 opened this issue 4 years ago • 6 comments

我的开发环境是Mac on Apple M1,用的是: Android Studio Arctic Fox | 2020.3.1 Beta 3 Runtime version: 11.0.10+0-b96-7249189 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.2.3

gradle编译的时候,会提示: A problem occurred configuring project ':app'.

Could not resolve all files for configuration ':app:AndResGuardLocatorSevenZip'. Could not find SevenZip-1.2.21-osx-aarch_64.exe (com.tencent.mm:SevenZip:1.2.21). Searched in the following locations: https://mirrors.huaweicloud.com/repository/maven/com/tencent/mm/SevenZip/1.2.21/SevenZip-1.2.21-osx-aarch_64.exe

lomoya90 avatar Jun 09 '21 07:06 lomoya90

def isWindows() {
    return org.gradle.internal.os.OperatingSystem.current().isWindows()
}

andResGuard {
    use7zip = isWindows()
    sevenzip {
        if (isWindows()) {
            artifact = 'com.tencent.mm:SevenZip:1.2.21'
        }
    }
}

可以暂时这样解

MankIndX avatar Jun 11 '21 07:06 MankIndX

@MankIndX Thank you!

lomoya90 avatar Jul 02 '21 08:07 lomoya90

这种做法对我没有用,公司的项目集成了Tinker,andResGuard。请问还有其他解决办法吗,何时可以兼容呢

mandroidstudy avatar Jul 09 '21 16:07 mandroidstudy

同问,我是集成到nexus上了,提示无法下载这个文件

panmin avatar Jul 21 '21 03:07 panmin

已收到

mandroidstudy avatar Jan 11 '24 06:01 mandroidstudy

if (project.osdetector.classifier == "osx-aarch_64") {
        configurations.configureEach {
            if (it.name == "AndResGuardLocatorSevenZip") {
                project.dependencies.add(it.name, [group     : "com.tencent.mm",
                                                   name      : "SevenZip",
                                                   version   : "1.2.21",
                                                   classifier: "osx-x86_64",
                                                   ext       : 'exe'])
            }
        }
    } else {
        sevenzip {
            artifact = "com.tencent.mm:SevenZip:1.2.21"
        }
    }

wsx-planb avatar Jan 11 '24 06:01 wsx-planb